Quantcast
Channel: 500 – WordPress.org Forums
Viewing all articles
Browse latest Browse all 2443

create customer via API fails

$
0
0

Hi,
I have a problem creating a new customer using the wc API.
Running GET commands works fine, so authentication is not the problem. But when trying a post command, I get the following error in the debug log:

*****
[17-Oct-2019 22:46:18 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_error_code() on null in C:\Websites\Docks\wp-content\plugins\woocommerce\includes\wc-user-functions.php:82
Stack trace:
#0 C:\Websites\Docks\wp-content\plugins\woocommerce\includes\data-stores\class-wc-customer-data-store.php(107): wc_create_new_customer(‘test1@pingus.de’, ‘Test.Doe’, ‘EZMyVO48&960’)
#1 C:\Websites\Docks\wp-content\plugins\woocommerce\includes\class-wc-data-store.php(169): WC_Customer_Data_Store->create(Object(WC_Customer))
#2 C:\Websites\Docks\wp-content\plugins\woocommerce\includes\abstracts\abstract-wc-data.php(218): WC_Data_Store->create(Object(WC_Customer))
#3 C:\Websites\Docks\wp-content\plugins\woocommerce\packages\woocommerce-rest-api\src\Controllers\Version1\class-wc-rest-customers-v1-controller.php(342): WC_Data->save()
#4 C:\Websites\Docks\wp-includes\rest-api\class-wp-rest-server.php(946): WC_REST_Customers_V1_Controller->create_item(Object(WP_REST_Request))
#5 C:\Websites\Docks\wp-includes\rest-api\class-wp-rest-server.php(329): WP_RE in C:\Websites\Docks\wp-content\plugins\woocommerce\includes\wc-user-functions.php on line 82
*****

Can anyone assist me here?

Best regards,
Caroline


Viewing all articles
Browse latest Browse all 2443

Trending Articles