[wp-meta] [Making WordPress.org] #3226: JavaScript breaks registration flow Using CampTix Indian Payments
Making WordPress.org
noreply at wordpress.org
Wed Oct 25 10:49:58 UTC 2017
#3226: JavaScript breaks registration flow Using CampTix Indian Payments
-------------------------------------+-----------------------------------
Reporter: codexdemon | Owner:
Type: defect | Status: new
Priority: highest omg bbq | Milestone: Plugin Directory v3.0
Component: WordCamp Site & Plugins | Keywords: has-patch
-------------------------------------+-----------------------------------
The camptix-multi-popup.js only applies to Razorpay currently, but it gets
enqueued no matter which of the gateways are enabled. When Instamojo is
the only enabled payment method, the script can prevent the Register
button from submitting the form successfully.
This bug was discovered on the WordCamp Nashik 2017 site, which is using
Instamojo, but not Razorpay.
To reproduce:
Enable Instamojo, but not Razorpay
On the front end Tickets page, apply a coupon
Then click the Register button to start the checkout process
Clicking the button will cause the viewport to scroll down the Tickets
page a ways, but otherwise do nothing.
Suggested fix:
The quickest fix is to detect whether Razorpay is enabled, and only
enqueue the script if it is. However, since it's possible that both
Razorpay and Instamojo (and other future gateways added to the plugin)
could all be enabled at the same time, a better fix would be to refine the
script so that it only captures the Register button when completing the
checkout using Razorpay.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/3226>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list