• Resolved apattee

    (@apattee)


    Hi there:

    The plugin looks great and appears to be working really well too. Unfortunately, on the checkout page, if I change my payment method, the button doesn’t dynamically change. If I make a change to the shipping options, it will reload (via ajax) the payment methods thus resulting in the correct button.

    But you’ll notice that if you’re on credit cards, there is a place order button. But if you change it to Apple Pay, or anything else, the button remains. If you force a reload by editing the shipping, the button then changes.

    Is it possible to use ajax and reload the button anytime there is a change in payment methods?

    Thanks,

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

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

    (@mrclayton)

    Hi @apattee,

    The Stripe plugin enqueues the form-handler.js script which handles the payment method change event.

    I reviewed your checkout page and I can see that file is missing from your checkout page which means something is interfering with the WordPress script enqueuement. My recommendation is to try and find the conflict by disabling plugins until it loads.

    You can also try temporarily switching to a default theme to test if it’s related to your theme.

    Kind regards,

    Thread Starter apattee

    (@apattee)

    Thanks for your reply. I disabled EVERYTHING except woocommerce and stripe and the behavior continued. I’m not sure where that leaves us.

    Should there be a form-handler.js file that is currently missing? You said it’s missing from the checkout page, so I just wonder if there’s something I should be looking to add it?

    Plugin Author Payment Plugins

    (@mrclayton)

    @apattee

    I just checked your website and the script is being loaded and the payment buttons are being hidden and shown as expected.

    Did you find where the conflict was?

    Kind regards,

    Thread Starter apattee

    (@apattee)

    Well, it wasn’t a plugin conflict, but it seems to be a theme conflict. I’m using Flatsome, which is probably one of the most popular themes there is, so I’m not sure how to move forward.

    Plugin Author Payment Plugins

    (@mrclayton)

    @apattee

    I have tested this plug-in specifically with the flatsome theme and never encountered an issue like what you are describing. There are many hundreds of merchants that use this plug-in and also use the flatsome theme and don’t have this problem.

    Did you check to see if you have any custom development as part of your child theme? Or have you added some custom JavaScript to your WordPress site?

    Kind regards,

    Thread Starter apattee

    (@apattee)

    I believe you, and I’m not suggesting this is an issue with your plugin!

    I’ve narrowed it down to an issue with using the flatsome child theme. Still trying to figure out why that would be a conflict.

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @apattee,

    I think I know what the problem is. The form-handler.js file depends on the selectWoo script. That’s the script that’s used for the billing/shipping country dropdown on the checkout page. It looks like your child theme is de-queuing that selectWoo script.

    Kind Regards,

    Thread Starter apattee

    (@apattee)

    That’s interesting, though I don’t know why. I’m looking for any weird shipping options that I would have, though I don’t think I have any.

    Plugin Author Payment Plugins

    (@mrclayton)

    @apattee

    I was planning on releasing a new version of the plugin today. I think it makes sense if I update the code so that it removes the selectWoo dependency just in case child themes dequeue it. The selectWoo script is used to improve the saved payment method drop-down UX but it’s not crucial to the functionality of the plugin.

    Can you reach out to me via our Help button on the Stripe plugin pages and you can test?

    Kind Regards,

    Thread Starter apattee

    (@apattee)

    I’m looking for the help button and I’m not seeing it on the plugin page. But yes, I’d love to test.

    Plugin Author Payment Plugins

    (@mrclayton)

    @apattee The Help button is located on all the Stripe plugin settings pages. For example if you go to the API Settings page of the Stripe plugin, it’s the purple Help button on the bottom right.

    Thread Starter apattee

    (@apattee)

    Found it, thanks! I just sent a message.

    Plugin Author Payment Plugins

    (@mrclayton)

    Marking as resolved. The merchant’s child theme was dequeuing the selectWoo script.

    The next version of the plugin removes selectWoo as a dependency.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘AJAX in Cart Not Working Great’ is closed to new replies.