Removed unnecessary parameter. Also removed from tests.

This commit is contained in:
Khan M Rashedun-Naby 2018-06-07 21:25:13 +06:00
parent ba8e866bf1
commit 4b14cbc727
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(