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:
Claudiu Lodromanean 2018-06-08 11:34:42 -07:00 committed by GitHub
commit 3d4dfda568
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -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();

View File

@ -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(