• Resolved MartinArnedo

    (@martinarnedo)


    hello every body.

    I have a little issue with the new version of the plugin.

    my first issue was that anybody try to buy a product with the gpay stripe button, when you select the addres, stripe empty the cart.

    this issue is at wp-content/plugins/woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-payment-request.php on line 927

    from line 924
    // First empty the cart to prevent wrong calculation.
    WC()->cart->empty_cart();

    if ( ‘variable’ === ( WC_Stripe_Helper::is_wc_lt( ‘3.0’ ) ? $product->product_type : $product->get_type() ) && isset( $_POST[‘attributes’] ) ) {
    $attributes = array_map( ‘wc_clean’, $_POST[‘attributes’] );

    if ( WC_Stripe_Helper::is_wc_lt( ‘3.0’ ) ) {
    $variation_id = $product->get_matching_variation( $attributes );
    } else {
    $data_store = WC_Data_Store::load( ‘product’ );
    $variation_id = $data_store->find_matching_product_variation( $product, $attributes );
    }

    WC()->cart->add_to_cart( $product->get_id(), $qty, $variation_id, $attributes );
    }

    if ( ‘simple’ === ( WC_Stripe_Helper::is_wc_lt( ‘3.0’ ) ? $product->product_type : $product->get_type() ) ) {
    WC()->cart->add_to_cart( $product->get_id(), $qty );
    }

    WC()->cart->calculate_totals();

    but if i comment //WC()->cart->empty_cart();

    then it works, and i can select the addres and stripe don′t empty the cart. but at the next step, when you push the button pay, then it fails with another issue with the province.

    this is the orinal full error log

    /home/sensual1/public_html/sensualintim.com/wp-includes/plugin.php( in /home/sensual1/public_html/sensualintim.com/wp-content/plugins/woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-payment-request.php on line 927
    [19-Sep-2019 18:13:28 UTC] PHP Warning: preg_match(): Unknown modifier ‘&’ in /home/sensual1/public_html/sensualintim.com/wp-content/plugins/woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-payment-request.php on line 974
    [19-Sep-2019 18:13:28 UTC] PHP Warning: preg_match(): Unknown modifier ‘&’ in /home/sensual1/public_html/sensualintim.com/wp-content/plugins/woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-payment-request.php on line 987
    [19-Sep-2019 18:17:04 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_type() on boolean in /home/sensual1/public_html/sensualintim.com/wp-content/plugins/woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-payment-request.php:927
    Stack trace:
    #0 /home/sensual1/public_html/sensualintim.com/wp-includes/class-wp-hook.php(286): WC_Stripe_Payment_Request->ajax_add_to_cart(”)
    #1 /home/sensual1/public_html/sensualintim.com/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array)
    #2 /home/sensual1/public_html/sensualintim.com/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
    #3 /home/sensual1/public_html/sensualintim.com/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(87): do_action(‘wc_ajax_wc_stri…’)
    #4 /home/sensual1/public_html/sensualintim.com/wp-includes/class-wp-hook.php(286): WC_AJAX::do_wc_ajax(”)
    #5 /home/sensual1/public_html/sensualintim.com/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(false, Array)
    #6 /home/sensual1/public_html/sensualintim.com/wp-includes/plugin.php( in /home/sensual1/public_html/sensualintim.com/wp-content/plugins/woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-payment-request.php on line 927
    [19-Sep-2019 18:17:24 UTC] PHP Warning: preg_match(): Unknown modifier ‘&’ in /home/sensual1/public_html/sensualintim.com/wp-content/plugins/woocommerce-gateway-stripe/includes/payment-methods/class-wc-stripe-payment-request.php on line 974

    thanks with your help

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there @martinarnedo,

    > my first issue was that anybody try to buy a product with the gpay stripe button, when you select the addres, stripe empty the cart.

    I’m sorry to hear that! This kind of problem is usually caused by either a conflict with your theme or with another plugin.

    The best way to determine this is to:

    – Temporarily switch your theme to Storefront
    – Disable all plugins except for WooCommerce
    – Repeat the action that is causing the problem

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict.
    You can find a more detailed explanation on how to do a conflict test here.

    If the issue persists after the conflict test, please get back to us with the System Status obtained when plugins/theme were switched. You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. You can use https://pastebin.com/ to paste it here.

    Cheers!

    Hi there @martinarnedo,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Stripe with G Pay change price to zero’ is closed to new replies.