• Resolved Payment Plugins

    (@mrclayton)


    Hello,

    I am reporting what appears to be a bug with your cartflows solution. If any other plugin or custom code calls the WC()->checkout()->get_checkout_fields() method before your action cartflows_checkout_form_before is triggered, the email address field will appear twice on the checkout page using one of your custom checkout templates.

    The reason for this is because when the WC()->checkout()->get_checkout_fields() function is called, WC keeps a reference to the stored fields. If the function is called again, it returns the instance variable $this->fields rather then running the checkout fields filter woocommerce_checkout_fields again.

    Since your Cartflows_Checkout_Markup::unset_fields_for_modern_checkout method isn’t added to the filter sequence until the cartflows_checkout_form_before action is called, your filter for unsetting the billing email is never called, resulting in a duplicate email address being printed.

    Thanks,

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support CartFlows Team

    (@cartflows)

    Hello @mrclayton

    Thank you for getting in touch with us and sharing the full details of the behavior.

    Surely we will help you with the case. To help you better with it, can you please provide info on the below points?

    – Is it possible to call the WC()->checkout()->get_checkout_fields() function after the CartFlows action? So that, whenever the above function is called, you will get the updated fields.
    – Is there any plugin/theme creating such conflict? If yes, then can you share the name of it so that I can try replicating it at our end? This will help us to add the best possible solution for the rest of the similar themes/plugins.

    I hope this clarifies you.

    I am looking forward to hearing from you.

    Thread Starter Payment Plugins

    (@mrclayton)

    Hi @cartflows

    – Is it possible to call the WC()->checkout()->get_checkout_fields() function after the CartFlows action? So that, whenever the above function is called, you will get the updated fields.

    That doesn’t solve the issue of other plugins that might call WC()->checkout()->get_checkout_fields() before your cartflows_checkout_form_before. I believe the best solution is one in which most if not all plugins are accounted for rather than each plugin author having to change their architecture.

    Is there any plugin/theme creating such conflict? If yes, then can you share the name of it so that I can try replicating it at our end? This will help us to add the best possible solution for the rest of the similar themes/plugins.

    We are able to replicate this issue with our plugin, Payment Plugins for Stripe WooCommerce, for versions prior to 3.3.27. https://wordpress.org/plugins/woo-stripe-payment/

    In version 3.3.27, we made an adjustment to ensure the Cartflows issue does not occur.

    https://plugins.trac.wordpress.org/browser/woo-stripe-payment/tags/3.3.27/packages/cartflows/src/Main.php#L13

    Thanks,

    Plugin Support CartFlows Team

    (@cartflows)

    Hello @mrclayton

    Thank you for sharing more information.

    I have forwarded this to one of our developers to add a way to avoid the duplicate email field on the checkout page.

    Once it is fixed, we will release an update immediately to help fix this quickly.

    I hope this helps you.

    Please let me know your thoughts on it.

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