• Resolved picadera

    (@picadera)


    Hi there,

    As mentioned, I’d like to hide the PP Express Checkout button on variable product pages if no variant has been selected e.g. size, color etc.

    At the moment, there is no way of doing this. The problem here is that PayPal will simply create an order with no size selected in WooCommerce.

    I think it should either 1) Not display the button until a size has been selected or 2) Return an error.

    Thank you for your help!

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @picadera

    Thank you for reaching out to us, we are here to help.

    The issue you described should actually not occur, but we have encountered situations where it does occur. One instance we currently have open in our backlog, is caused when this filter is being used:

    $wcv_reg_min_price = $product->get_variation_regular_price( 'min', true );
    $wcv_min_sale_price = $product->get_variation_sale_price( 'min', true );
    $wcv_max_price = $product->get_variation_price( 'max', true );
    $wcv_min_price = $product->get_variation_price( 'min', true );
    
    $wcv_price = ( $wcv_min_sale_price == $wcv_reg_min_price ) ?
    wc_price( $wcv_reg_min_price ) :
    '<del>' . wc_price( $wcv_reg_min_price ) . '</del>' . '<ins>' . wc_price( $wcv_min_sale_price ) . '</ins>';
    
    return ( $wcv_min_price == $wcv_max_price ) ?
    $wcv_price :
    sprintf('%s%s', $prefix, $wcv_price);
    }
    
    add_filter( 'woocommerce_variable_sale_price_html', 'wc_varb_price_range', 10, 2 );
    add_filter( 'woocommerce_variable_price_html', 'wc_varb_price_range', 10, 2 );

    We don’t know what is causing this behavior in your case, but I would suggest looking for code that can be affecting the price for a product (without selecting a variation).

    You may want to perform a full conflict test to rule out eventual issues with the theme or a different plugin. We recommend temporarily activating the default theme Storefront and disabling all other plugins except for?WooCommerce and?PayPal Payments to see if the behavior persists. Here’s a guide that explains the steps in more detail: How to test for conflicts

    If you can’t find out what is causing this, you can also share more details with us, so we can take a closer look. If you don’t feel comfortable sharing those details on a public forum, please open a ticket with our service desk. You can find the instruction for this here: https://paypal.inpsyde.com/docs/request-support/
    (please add the URL of this thread in the ticket as well)

    Please let us know how this works out for you and if you require additional support.

    Kind regards,
    Joost

    Thread Starter picadera

    (@picadera)

    Hi there,

    I was able to reproduce the issue consistently now. These are the steps:

    • Go to variable product page
    • No PP express checkout visible
    • Now select a value from the variants
    • PP express checkout button appears
    • De-select value from variants
    • PP express checkout button does not disappear and can be used to complete purchase now

    I am not sure if this is only happening on my page. I tried looking for another PP express checkout on a product page but didn’t find one within a 10 minutes search or so.

    Thanks!

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @picadera

    It seems like we’re looking at two distinct issues here. Firstly, the anomaly on your single product page where the PayPal button pops up before a variation has been selected. This is unusual as the button typically appears only after a variant has been picked.

    A possible workaround to avoid potential errors could be to set a default variation in the variable product settings. However, it would be more beneficial to identify what’s causing this unusual behavior, as we’re unable to replicate it on our end. It could be influenced by a third-party plugin (like a caching or cookie consent plugin) or some custom code present on your site. The filter example shared earlier is one such potential cause.

    The second issue, the reappearance of the PayPal button even after deselecting a variant, is indeed a bug in the plugin. Generally, the PayPal button shouldn’t be displayed if no variant is chosen. But if a variant was picked and then deselected, the button fails to disappear as it should. The team will address this in an upcoming update.

    The first issue doesn’t appear to be something we can solve from our side, so it might require some further troubleshooting on your end.

    Hopefully, this information leads to the right way. If you’re stuck or need more help, don’t hesitate to let us know. Thanks!

    Kind regards,
    Niklas

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello,

    Since we did not hear back from you for 3 weeks, we will mark this thread as resolved. The issues raised here are being worked on or are already in place to get resolved with the next release.

    Smart buttons on variable products appearing with no variation selected when using a filter:?Pending pickup by developer’s team. Workaround described above.

    Smart buttons not greyed out/removed on single product when deselecting product variation: Will be resolved with the release of 2.2.0

    If you have any further questions or other issue, please open a new thread.

    Kind regards,
    Joost

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide Express Checkt if no variant/variable product selected’ is closed to new replies.