Paypal doesn’t work when defaults are changed
-
We have used Forminator with paypal for years with no problem, and it’s working successfully on another page.
For this page, the cost changes base on the total number of scouts. If the default value of 1 is used, clicking on pay with paypal successfully launches the paypal window. However, if that number is changed, the window doesn’t open at all.
Any ideas?
Web page – https://pack97.com/dues-payment/
-
This topic was modified 12 months ago by
mariafrederick.
The page I need help with: [log in to see the link]
-
This topic was modified 12 months ago by
-
Same issue here. Order-ID does not seem to get passed: err: ‘Error: Expected an order id to be passed\n
This error does not occur in sandbox mode; the transaction works without any problems here.
For my issue, there is no error being displayed, the user just does not see a popup when clicking the paypal button.
I also confirmed that this behavior persists regardless of whether the payment amount is fixed or variable.
Here’s a link to the exported form: https://drive.google.com/file/d/1ZDCGZ-5rJ-aS6vp3e5ROnEBf7MhH1nIx/view?usp=drive_link
-
This reply was modified 12 months ago by
mariafrederick.
And just for reference, here’s a form on our site that is live now and IS working https://pack97.com/2025-doseum-overnight-registration/
Export: https://drive.google.com/file/d/19bNGHK1zuEhkWjGSDAzuK-QxGJXBvahR/view?usp=drive_link
Hello @mariafrederick ,
Hope you’re doing well today! Sorry to hear about the issue you are facing with your Forminator form.
I was able to replicate the issue on the Payments Due form for which you shared the export, and I can confirm that the issue that you are seeing there is a bug which has been reported to us already. The issue you notice only occurs when the form uses a repeater field, which is not present on the other form you shared on the page /2025-doseum-overnight-registration/
The Forminator devs are already working on a fix. However, unfortunately, at the moment, I will not be able to share an exact ETA as to when the fix will be released.
Meanwhile you can use the temporary workaround (fix) below that can be added as a mu-plugin. I have tested it on my lab site and should work fine.
<?php add_action( 'wp_footer', 'wpmudev_fix_calculation_repeater', 9999 ); function wpmudev_fix_calculation_repeater() { global $post; if ( is_a( $post, 'WP_Post' ) && ! has_shortcode( $post->post_content, 'forminator_form' ) ) { return; } ?> <script type="text/javascript"> jQuery(document).ready(function($){ setTimeout(function() { $('.forminator-custom-form').trigger('after.load.forminator'); },500); $(document).on('after.load.forminator', function(e, form_id) { var form_ids = ['forminator-module-2193']; // Add your form IDs here. if ( form_ids.includes( e.target.id ) ) { $(document).on('mouseover touchstart', '#' + e.target.id +' .forminator-paypal-row', function() { var name = $('#' + e.target.id +' #name-1 input[name="name-1-first-name"]').val(); setTimeout(function(){ $('#' + e.target.id +' #name-1 input[name="name-1-first-name"]').val(''); },50); setTimeout(function(){ if ( name ) { $('#' + e.target.id +' #name-1 input[name="name-1-first-name"]').val(name).trigger('change'); } },100); }); } }); }); </script> <?php }Note: Please change the form IDs in this line var form_ids = [‘forminator-module-2193’]; // Add your form IDs here.
The form ID is the number that you see on the Forminator Shortcode.
Steps to use the workaround:
– Copy and paste the snippet on a Blank PHP file
– Update the form IDs to your form ID value
– Save the .PHP file with name, for example forminator-repeater-fix.php
– Upload the file to /wp-content/mu-plugins/ directory of your site. (Guide: https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins)Important Note: Before applying the workaround, please make sure to do a full backup of your website as a safety checkpoint.
Please let us know how it goes.
@totheo, although the issue might sound similar, there can be multiple reasons why it can occur and we will need to check the issue further, for this, could you please create a separate topic https://ww.wp.xz.cn/support/plugin/forminator/ so we can help you there?
Kind Regards,
SaurabhThanks for the confirmation on the root cause. Do you know if there’s any chance that this solution would break if the site is updated?
Hi @mariafrederick,
Ideally, an update shouldn’t break the site because the above workaround is implemented on the website. However, we recommend testing the workaround on a dev/staging environment before implementing it in the live website.
Please feel free to get back to us if you need any further clarification.
Best Regards,
Nebu JohnThanks for the detail. We are a very small site and don’t have a dev staging, so we are going to instead just make several sets of the repeating field so we can take the repeater off and use the payment gateway as is. Thanks for letting us know, and is it possible to get notified when this bug is fixed so we can go back to using the repeater?
You can use the WP Staging plugin to test it on a Staging site https://ww.wp.xz.cn/plugins/wp-staging/
About the bug, we don’t have an estimated time to release the fixed version but you can subscribe to our roadmap on https://wpmudev.com/roadmap/#dev-subscribe and receive notification about our releases.
Best Regards
Patrick FreitasWe haven’t heard from you in a while, I’ll go and mark this thread as resolved. If you have any additional questions or require further help, please let us know!
Kind Regards,
Kris -
This reply was modified 12 months ago by
The topic ‘Paypal doesn’t work when defaults are changed’ is closed to new replies.