Merge pull request #20435 from rnaby/070618-212333-wc-privacy-exporters-customer_data_exporter
Removed unnecessary parameter. Also removed from tests.
This commit is contained in:
commit
3d4dfda568
|
@ -17,10 +17,9 @@ class WC_Privacy_Exporters {
|
|||
*
|
||||
* @since 3.4.0
|
||||
* @param string $email_address The user email address.
|
||||
* @param int $page Page.
|
||||
* @return array An array of personal data in name value pairs
|
||||
*/
|
||||
public static function customer_data_exporter( $email_address, $page ) {
|
||||
public static function customer_data_exporter( $email_address ) {
|
||||
$user = get_user_by( 'email', $email_address ); // Check if user has an ID in the DB to load stored personal data.
|
||||
$data_to_export = array();
|
||||
|
||||
|
|
|
@ -58,11 +58,11 @@ class WC_Test_Privacy_Export extends WC_Unit_Test_Case {
|
|||
*/
|
||||
public function test_customer_data_exporter() {
|
||||
// Test a non existing user.
|
||||
$response = WC_Privacy_Exporters::customer_data_exporter( 'doesnotexist@test.com', 1 );
|
||||
$response = WC_Privacy_Exporters::customer_data_exporter( 'doesnotexist@test.com' );
|
||||
$this->assertEquals( array(), $response['data'] );
|
||||
|
||||
// Do a test export and check response.
|
||||
$response = WC_Privacy_Exporters::customer_data_exporter( 'test1@test.com', 1 );
|
||||
$response = WC_Privacy_Exporters::customer_data_exporter( 'test1@test.com' );
|
||||
$this->assertTrue( $response['done'] );
|
||||
$this->assertEquals(
|
||||
array(
|
||||
|
|
Loading…
Reference in New Issue