Hello,
Then you can disable the Pay Later messaging in the Pay Later tab which should resolve these messages in the frontend.
I am confused, actually, PayPal Pay?Later is actually disabled at the backend before I post here last time:
https://prnt.sc/rp187a5JozwQ
Anyway, I did a try and put the following code snippets of Disable Pay Later messaging Configurator in 2.6.0+
add_filter( 'woocommerce.feature-flags.woocommerce_paypal_payments.paylater_configurator_enabled', '__return_false' );
- In the plugin of cod snippets, I set it to be Run snippet everywhere, and it will cause serious error at frontend: There has been a critical error on this website:
https://prnt.sc/JnO-EsULINhn
2. If set it be “Only run in administration area”, the frontend page can be accessible, but the errors persisit:
https://prnt.sc/S9AbV0c-kjad
3. I just noted there is another one code snippt at https://github.com/woocommerce/woocommerce-paypal-payments/wiki/Actions-and-Filters#programmatically-disable-pay-later
Programmatically disable Pay Later
add_filter(‘woocommerce_paypal_payments_product_buttons_paylater_disabled’, ‘__return_true’);
add_filter(‘woocommerce_paypal_payments_buttons_paylater_disabled’, ‘__return_true’);
and I just note the error dispear.
So, two questions please:
1# Could you please clarify which one code snippet should be used? Programmatically disable Pay Later, or, Disable Pay Later messaging Configurator in 2.6.0+?
2# Will the error be fixed natively in the next update? or should we always use the method of the above code snippet?
Thanks
-
This reply was modified 5 months, 3 weeks ago by alexliii.