• Resolved jituoou

    (@jituoou)


    Hi, one user cannot buy a subscription product,
    That user getting a fatal error,
    The error code is,

    Fatal error: Uncaught Error: Cannot unset string offsets in /wp-content/plugins/woo-payment-gateway/includes/class-wc-subscriptions-checkout.php:40 Stack trace: #0 /wp-content/plugins/woo-payment-gateway/includes/class-wc-subscriptions-checkout.php(174): Braintree_Gateway_WC_Subscriptions_Checkout::process_checkout(12906, Array) #1 /wp-includes/class-wp-hook.php(286): Braintree_Gateway_WC_Subscriptions_Checkout: :pay_order_action(Object(WC_Order)) #2 /wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(", Array) #3 /wp-includes/plugin.php(453): WP_Hook->do_action(Array) #4 /wp-content/plugins/woocommerce/includes/class-wc-form-handler.php(362): do_action('woocommerce_bef...', Object(WC_Order)) #5 /home/holyshif/public_htmlimembers/wp-includes/class-wp-hook.php(286): WC_Form_Handler:pay_action(Object(WP)) #6 /home/ in /wp-content/plugins/woo-payment-gatewayfincludes/class-wc-subscriptions-checkout.php on line 40

    Waiting for your reply.
    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @jituoou,

    Thank you for providing the error log. Can you also provide your WC version and PHP version?

    Is this error only occurring for a single user or multiple users?

    Kind Regards,

    Thread Starter jituoou

    (@jituoou)

    Hi @mrclayton ,
    Thanks for your reply.
    PHP version: 7.0.33
    WordPress version: 5.2.2
    Woocomerce version: 3.5.3
    Braintree For WooCommerce: 2.6.52

    The only one user reported it to us.
    We are not sure any other user faced it or not.
    Thanks.

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @jituoou,

    Thank you for providing that information. If there aren’t anymore entries in your error log then it’s most likely just that one customer. The code being called where the error is triggered is rarely executed because it’s part of an if statement with specific conditions.

    That php error gets thrown when code tries to execute an unset statement on a string instead of an array. Our plugin always sets the $recurring_carts object as an array. Is it possible you have used one of the plugin’s filters to alter the $recurring_carts data?

    Kind Regards,

    Thread Starter jituoou

    (@jituoou)

    Hi @mrclayton,
    I am checking, getting back to you.

    Thread Starter jituoou

    (@jituoou)

    @mrclayton Hi,
    I checked in my theme, we do have some filter for cart, to just get from active cart, but we are not overwriting anything else.

    We are not using any other plugin except ‘Braintree For WooCommerce’.

    For your more specification, you can ask me more help from me.
    Like if you can ask me to debug more on something, I can do.

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @jituoou,

    Thank you for checking your code for me. For now let’s see if this error happens again on your site. I suspect this was a one off, very rare type of error related to the customer’s WC session.

    We can leave this support thread open if you like so you can post any additional information or I can close and should you see this again a new thread can be opened.

    Kind Regards,

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Checkout failed for a specific user for a subscription product.’ is closed to new replies.