Open tarsonis123 opened 3 years ago
This code helped to solve the issue. Found on github and credits to the creator:
/* Fix PAYPAL IPN URL translated by polylang / function custom_rewrite_basic_wc() { add_rewrite_rule('^wc-api/(.+)/?', 'index.php?wc-api=$matches[1]', 'top'); } add_action('init', 'custom_rewrite_basic_wc');
If there is another clean solution I would like to hear about.
I note that I commented on #218 that this solution is only needed if “Hide URL language information for default language” is not set. That comment is nearly 4 years old however I am not aware of any problems currently at least with the default WooCommerce Paypal gateway (without YITH).
So I suggest also trying the Polylang option to Hide URL language information for default language, at the top of /wp-admin/admin.php?page=mlang_settings
Hello,
Since using Polylang with WooPoly the express button on the product page leads to an 404 error. The paypal window open up, disappears after some seconds and one get this error with a massive amount of html code after that: Error: Request to post https://example.com/wc-api/yith_paypal_ec/?yith_paypal_set_express_checkout=1 failed with 404 error. Correlation id: unknown
Putting the /language/ slug like this https://example.com/language/wc-api/yith_paypal_ec/?yith_paypal_set_express_checkout=1 the token works.
The website url configuration is like this: example.com/en/ example.com/de/
When I disable Polylang the express button works like expected also. Polylang is set to show /language/ for every page. I think the Yith plugin is not knowing about the new path structure as I had it installed and configured before I installed Polylang.
I've found an issue was posted on a similar matter but not the Express button. Is there a solution without adding a child theme or did I miss something in the WooPoly settings?
https://github.com/hyyan/woo-poly-integration/issues/218
Can you reproduce this issue on default Wordpress theme (eg Storefront)?
Yes
Can you reproduce this issue when all other plugins are disabled except WooCommerce, Polylang and Hyyan WooCommerce Polylang Integration?
Yes
What product versions and settings are you using when this issue occurs?
Steps to Reproduce
What I Expected
Paypal opens login/payment window
What Happened Instead
Paypal window closes with error message
Error: Request to post https://example.com/wc-api/yith_paypal_ec/?yith_paypal_set_express_checkout=1 failed with 404 error. Correlation id: unknown
WordPress Environment