• Resolved Gr1f

    (@gr1f)


    Hi,

    Express checkout Apple and Google pay. If it’s set to display on cart and you attempt to use it the transaction fails with a Warning about agreeing to privacy policy. However, the opt-ins for Privacy Policy and T&Cs are only visible on the Checkout Page.

    This seems to be a new behaviour.

    For now I have had to disable express checkout on the Cart page but the UX is bad as the Opt-ins are at the bottom of the checkout page.

    Everything is up-to-date

    I am using the standard WC cart and checkout modules.

    • This topic was modified 5 months, 1 week ago by Gr1f.

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hey there, @gr1f! Thanks for contacting us. I’m happy to help you.

    I have a required checkbox on checkout for the T&C and Privacy Policy and just tested on my website. I was able to purchase products from the product page using Google Pay.

    So let’s investigate to find out what is causing this issue ??

    Do you have any plugins or custom code that affect the checkout, cart or product page?

    Which theme are you using?

    Which versions of WooCommercer and Stripe are you using?

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter Gr1f

    (@gr1f)

    Hi,

    Thank you for your response. I have re-enabled express checkout on Product and cart page for testing and to display the error in question.

    Steps to reproduce: MacOS Safari/ Add product to Cart / Select Apple Pay

    Here’s some info:

    WordPress version:6.5.4

    WooCommerce version:9.0.0

    WooCommerce Stripe Gateway Version 8.4.0

    Using Elementor Version 3.22.1

    Elementor Pro version 3.22.0

    Theme Hello Elementor Version: 3.1.0 using Child version: 1.0.1

    Here is a list of active plugins:


    Elementor Addon Elements by WPVibes – 1.13.5
    All-in-One WP Migration by ServMask – 7.83
    Activity Log by Activity Log Team – 2.10.1
    Before After Image Comparison Slider for Elementor by Plugin Devs – 20.6.2
    Breeze by Cloudways – 2.1.9
    CookieYes | GDPR Cookie Consent by CookieYes – 3.2.4
    Duplicate Page by mndpsingh287 – 4.5.3
    Elastic Email Sender by Elastic Email Inc. – 1.2.16
    Elementor Pro by Elementor.com – 3.22.0
    Elementor by Elementor.com – 3.22.1
    Facebook for WooCommerce by Facebook – 3.2.4
    Google Language Translator by Translate AI Multilingual Solutions – 6.0.20
    Site Kit by Google by Google – 1.129.1
    Mailchimp for WooCommerce by Mailchimp – 4.1
    MalCare WordPress Security Plugin - Malware Scanner, Cleaner, Security Firewall by MalCare Security – 5.56
    Object Cache Pro by Rhubarb Group – 1.21.1
    Performance Lab by WordPress Performance Team – 3.2.0
    Phone Orders for WooCommerce by AlgolPlus – 3.9.0
    Rank Math SEO with AI SEO Tools by Rank Math – 1.0.221
    SEUR Oficial by José Conti – 2.1.1
    ShopMagic for WooCommerce by WP Desk – 4.2.16
    WC Min Max Quantities by PluginEver – 1.1.9
    Converter for Media by matt plugins – 5.12.5
    Conditional Discounts for WooCommerce - A simple yet complete woocommerce dynamic pricing plugin by ORION – 2.32.1
    Advanced Order Export For WooCommerce by AlgolPlus – 3.5.3
    WooCommerce Stripe Gateway by WooCommerce – 8.4.0
    Pixel Manager for WooCommerce by SweetCode – 1.43.3
    PDF Invoices & Packing Slips for WooCommerce by WP Overnight – 3.8.4
    Sequential Order Numbers for WooCommerce by SkyVerge – 1.10.1
    WooCommerce by Automattic – 9.0.0
    Wordfence Security by Wordfence – 7.11.6
    WP Mail Logging by WP Mail Logging Team – 1.12.0
    Thread Starter Gr1f

    (@gr1f)

    I reduced plugins to the following list with the same result.



    All-in-One WP Migration by ServMask – 7.83
    Before After Image Comparison Slider for Elementor by Plugin Devs – 20.6.2
    Breeze by Cloudways – 2.1.9
    CookieYes | GDPR Cookie Consent by CookieYes – 3.2.4
    Duplicate Page by mndpsingh287 – 4.5.3
    Elastic Email Sender by Elastic Email Inc. – 1.2.16
    Elementor Pro by Elementor.com – 3.22.0
    Elementor by Elementor.com – 3.22.1
    Site Kit by Google by Google – 1.129.1
    MalCare WordPress Security Plugin - Malware Scanner, Cleaner, Security Firewall by MalCare Security – 5.56
    Rank Math SEO with AI SEO Tools by Rank Math – 1.0.221
    SEUR Oficial by José Conti – 2.1.1
    Converter for Media by matt plugins – 5.12.5
    WooCommerce Stripe Gateway by WooCommerce – 8.4.0
    PDF Invoices & Packing Slips for WooCommerce by WP Overnight – 3.8.4
    WooCommerce by Automattic – 9.0.0
    Wordfence Security by Wordfence – 7.11.6
    WP Mail Logging by WP Mail Logging Team – 1.12.0
    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi there @gr1f,

    Thanks for getting back with further details on this.

    Looking at your active plugins, I can see that you have the Hello Elementor theme and several active plugins.

    Could you please try deactivating all other plugins and switch to a default theme like Storefront and check if the same issues persist?

    Be sure to have a full site backup which you can revert to. Alternatively, please try the steps in a staging site to avoid messing with your live store.

    Let us know how it goes.

    Thread Starter Gr1f

    (@gr1f)

    Thank you, I will do this now.

    Can you advise best practice to allow test stripe express payments on the staging environment?

    Thread Starter Gr1f

    (@gr1f)

    It’s OK, I have managed to sort it

    Thread Starter Gr1f

    (@gr1f)

    OK I have found the issue. On Staging site my first modification was to change the theme to Storefront. I saw there was an issue with the site logo, which I fixed. Express Payments succeeded!

    I then switched to Hello parent theme and payment succeeded. I had not disabled any plugins so it seems it’s good to go for now!

    I then replicated this on the live site and payments are succeeding.

    For anyone else, Elementor Hello Child seems to create the issue. OR it might have been a corrupt site logo. Steps above fixed it.

    Thank you for your help!

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi again @gr1f,

    I’m glad to hear you were able to sort out this issue from your end.

    In that case, I’ll go ahead and mark this thread as solved. Should you have any questions, please feel free to reach out.

    All the best!

    Thread Starter Gr1f

    (@gr1f)

    Just to update as another issue flagged an update to this issue.

    I think the issue arose from this code.

    // Show error if user does not tick

    add_filter( 'woocommerce_registration_errors', 'bbloomer_validate_privacy_registration', 10, 3 );

    function bbloomer_validate_privacy_registration( $errors, $username, $email ) {
    if ( ! is_checkout() ) {
    if ( ! (int) isset( $_POST['privacy_policy_reg'] ) ) {
    $errors->add( 'privacy_policy_reg_error', __( 'Privacy Policy consent is required!', 'woocommerce' ) );
    }
    }
    return $errors;
    }

    /* Additional code realting to Phone Orders Plugin */
    add_filter('wpo_before_create_customer', function($data) {
    $_POST['privacy_policy_reg'] = 1;
    return $data;
    });

    /* checkbox on checkout page */
    add_action( 'woocommerce_review_order_before_submit', 'add_privacy_checkbox', 9 );
    function add_privacy_checkbox() {
    woocommerce_form_field( 'privacy_policy', array(
    'type' => 'checkbox',
    'class' => array('form-row privacy'),
    'label_class' => array('woocommerce-form__label woocommerce-form__label-for-checkbox checkbox'),
    'input_class' => array('woocommerce-form__input woocommerce-form__input-checkbox input-checkbox'),
    'required' => true,
    'label' => 'I\'ve read and accept the Privacy Policy',
    ));
    }
    add_action( 'woocommerce_checkout_process', 'privacy_checkbox_error_message' );
    function privacy_checkbox_error_message() {
    if ( ! (int) isset( $_POST['privacy_policy'] ) ) {
    wc_add_notice( __( 'You have to agree to our privacy policy in order to proceed' ), 'error' );
    }
    }

    I’ve removed it for now but I’m sure I’ll have to find a way to achieve the result the original code was used for.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @gr1f

    I’m glad you were able to find a solution to your inquiry here and thanks for sharing it with the community too! ??

    I’ve removed it for now but I’m sure I’ll have to find a way to achieve the result the original code was used for.

    We recommend asking development questions on the #developers channel of the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question. You can also seek help from the following:

    Meanwhile, I will mark this thread as resolved. Should you have further inquiries, kindly create a new topic here.

    Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.