Title: Error php &#8211; create user via api woocomerce
Last modified: July 22, 2022

---

# Error php – create user via api woocomerce

 *  Resolved [Render Cursos Sistemas](https://wordpress.org/support/users/sistemasrender/)
 * (@sistemasrender)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-php-create-user-via-api-woocomerce/)
 * When trying to create a new user using the woocommerce api (php7 and wc/v3), 
   it gives this error in the plugin.
 *     ```
       [22-Jul-2022 03:20:55 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get() on null in /home/www/www.render.com.br/html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-vaulting/src/VaultingModule.php:111
       Stack trace:
       #0 /home/www/www.render.com.br/html/wp-includes/class-wp-hook.php(289): WooCommerce\PayPalCommerce\Vaulting\VaultingModule->WooCommerce\PayPalCommerce\Vaulting\{closure}(252496)
       #1 /home/www/www.render.com.br/html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
       #2 /home/www/www.render.com.br/html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
       #3 /home/www/www.render.com.br/html/wp-content/plugins/woocommerce/includes/wc-user-functions.php(105): do_action('woocommerce_cre...', 252496, Array, false)
       #4 /home/www/www.render.com.br/html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-customer-data-store.php(108): wc_create_new_customer('alisson@render....', 'alisson@render....', 'd5c432')
       #5 /home/www/www.render.com.br/html/wp-content/plugins/woocommerce/includes/class-wc-d in /home/www/www.render.com.br/html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-vaulting/src/VaultingModule.php on line 111
       ```
   
 * This error is causing error500 and crashing POST request “create customer woocomerce”
 * To fix the problem provisionally, I commented out lines 107 to 115 of the VaultingModule.
   php file
 *     ```
       $subscription_helper = $container->get( 'subscription.helper' );
       		/*add_action(
       			'woocommerce_created_customer',
       			function( int $customer_id ) use ( $subscription_helper ) {
       				$guest_customer_id = WC()->session->get( 'ppcp_guest_customer_id' );
       				if ( $guest_customer_id && $subscription_helper->cart_contains_subscription() ) {
       					update_user_meta( $customer_id, 'ppcp_guest_customer_id', $guest_customer_id );
       				}
       			}
       		);*/
       ```
   
 * I’m waiting for the plugin update and help to solve the problem.
    Thanks.

Viewing 1 replies (of 1 total)

 *  Plugin Support [Syde Joost](https://wordpress.org/support/users/joostvandevijver/)
 * (@joostvandevijver)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/error-php-create-user-via-api-woocomerce/#post-15849102)
 * closing this thread as a duplicate from [https://wordpress.org/support/topic/fatal-error-php-create-user-via-api-woocomerce/](https://wordpress.org/support/topic/fatal-error-php-create-user-via-api-woocomerce/)

Viewing 1 replies (of 1 total)

The topic ‘Error php – create user via api woocomerce’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-paypal-payments/assets/icon-256x256.png?rev=
   3234615)
 * [WooCommerce PayPal Payments](https://wordpress.org/plugins/woocommerce-paypal-payments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-paypal-payments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-paypal-payments/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-paypal-payments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-paypal-payments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-paypal-payments/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Syde Joost](https://wordpress.org/support/users/joostvandevijver/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/error-php-create-user-via-api-woocomerce/#post-15849102)
 * Status: resolved