• Resolved Render Cursos Sistemas

    (@sistemasrender)


    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/XXX/html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-vaulting/src/VaultingModule.php:111
    Stack trace:
    #0 /home/www/XXX/html/wp-includes/class-wp-hook.php(289): WooCommerce\PayPalCommerce\Vaulting\VaultingModule->WooCommerce\PayPalCommerce\Vaulting\{closure}(252496)
    #1 /home/www/XXX/html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
    #2 /home/www/XXX/html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #3 /home/www/XXX/html/wp-content/plugins/woocommerce/includes/wc-user-functions.php(105): do_action('woocommerce_cre...', 252496, Array, false)
    #4 /home/www/XXX/html/wp-content/plugins/woocommerce/includes/data-stores/class-wc-customer-data-store.php(108): wc_create_new_customer('XXX@render....', 'XXX@render....', 'XXX')
    #5 /home/www/XXX/html/wp-content/plugins/woocommerce/includes/class-wc-d in /home/www/XXX/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 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @sistemasrender

    I also received your request via our service desk and already responded to that. Let’s work on that request and add any outcome here once we find the cause for this issue.

    Kind regards,
    Joost

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @sistemasrender

    since this is an issue that is caused by custom coding, we will continue working via the ticket you created directly on our service desk. We have a bug open for this and are pending for our developers to pick it up.

    I will mark this thread as resolved and mention our developer’s ticket here (PPC-647) in case other merchants ask for an update on this matter in the future.

    Kind regards,
    Joost

Viewing 2 replies - 1 through 2 (of 2 total)

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