[ad_1]
@gunther12
The Paypal button currently can be pressed before all mandatory fields on the Checkout page are filled. This bypasses the Woocommerce checks and leads to the error message “not allowed”, which is not really meaningful.
You can click the PayPal button when fields are missing values because PayPal has the ability to provide a shipping and billing address for the order. If that information can be sourced by PayPal, then why make the customer enter information that’s already stored within PayPal? It’s no different than Apple Pay or GPay if you’re familiar with those payment methods. The PayPal plugin doesn’t bypass any WooCommerce checks.
Notice if you leave any address fields on the checkout page empty, PayPal will populate them for you automatically.
Woocommerce itself would check the fields and deliver a proper error message then. But as it is currently, the paypal button will just open the payment window before those checks happen.
WooCommerce doesn’t actually perform any validation checks client side. WC only validates the checkout fields once the checkout form has been submitted. You can verify this by reviewing the code in the WooCommerce WC_Checkout class.
WooCommerce submits the checkout form once the Place Order button is clicked, and only then are there any validations performed server side via the WC_Checkout class.
Kind Regards,
Please see my shop on LRTimelapse.com. It still uses an old, unsupported Paypal Plugin which I would like to replace. In Europe it is essential, that the user ticks some boxes, confirms it’s address etc. before (!) we fulfill the order. Only then we can accept the payment via Paypal. That’s also why we can’t use the Express checkout where Paypal provides all the data etc. It’s complicated, but unfortunately the Laws in Europe are like this.
It’s two things: Placing an order and paying. Paypal likes to mix this up but that’s not working for us.
Maybe you could consider a mode where we could use your Plugin for this scenario also. For now, unfortunately I had to deactivate it.
- This reply was modified 22 minutes ago by gunther12.
In Europe it is essential, that the user ticks some boxes, confirms it’s address etc. before (!) we fulfill the order
The address is confirmed if they choose one within PayPal or if they fill out the address fields on the checkout page manually. The order isn’t fulfilled at any point before the checkout form is submitted. WooCommerce doesn’t even create the order until the checkout form is submitted and all validations pass.
For now, unfortunately I had to deactivate it.
You might be overthinking this a bit. There isn’t anything wrong with using the address info provided by PayPal to populate the checkout fields. WooCommerce will validate that all the checkboxes are checked. If that doesn’t work for your business process, then use the PayPal plugin that best suits your needs.
Kind Regards,
