Removed unnecessary parameter. Also removed from tests.
This commit is contained in:
parent
ba8e866bf1
commit
4b14cbc727
|
@ -17,10 +17,9 @@ class WC_Privacy_Exporters {
|
||||||
*
|
*
|
||||||
* @since 3.4.0
|
* @since 3.4.0
|
||||||
* @param string $email_address The user email address.
|
* @param string $email_address The user email address.
|
||||||
* @param int $page Page.
|
|
||||||
* @return array An array of personal data in name value pairs
|
* @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.
|
$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();
|
$data_to_export = array();
|
||||||
|
|
||||||
|
|
|
@ -58,11 +58,11 @@ class WC_Test_Privacy_Export extends WC_Unit_Test_Case {
|
||||||
*/
|
*/
|
||||||
public function test_customer_data_exporter() {
|
public function test_customer_data_exporter() {
|
||||||
// Test a non existing user.
|
// 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'] );
|
$this->assertEquals( array(), $response['data'] );
|
||||||
|
|
||||||
// Do a test export and check response.
|
// 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->assertTrue( $response['done'] );
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
array(
|
array(
|
||||||
|
|
Loading…
Reference in New Issue