Hi @mike8040
We will check about this issue and in case we will an update to fix the problem
Just to be more specific. The Express button itself isn’t working on all pages that are selected in the settings but the regular checkout with Paypal as gateway does work. One gets redirected correctly in this case.
Its seems I’m not the only one. There is a issue posted on github about this behavior with language slugs.
https://github.com/hyyan/woo-poly-integration/issues/218
A fix would be much appreciated. For now I disabled all Express buttons.
Hello there,
the plugin sends to PayPal the “return_url” that is get calling this WooCommerce method
WC()->api_request_url( 'yith_paypal_ec' );
that you can find inside the class-woocommerce.php ( line 734 ).
This url can be filtered using this filter ‘woocommerce_api_request_url’.
I think that Polilang should fix it this issue with WooCommerce Api Url then automatically also the issue with Express Checkout will be fixed
Hey thanks for your feedback. Unfortunately this is out of my php knowledge what you are saying. Is there maybe any fix posted already I could try in the meantime till there is a permanent solution?
Right now I get a strange behavior. Express button works with
example.com/en/….
but not with
example.com/de/….
where the last lang is most important. I get the popup window saying:
“Since you were inactive for some time, we have logged you out for your safety. Go back to the dealer and start the checkout again.”
The url for the /de/
https://www.paypal.com/checkoutnow?locale.x=de_DE&fundingSource=paypal&sessionID=60a6333433_mji6ndk6mte&buttonSessionID=5dd0635251_mji6nte6mdq&env=production&fundingOffered=paypal&logLevel=warn&sdkMeta=eyJ1cmwiOiJodHRwczovL3d3dy5wYXlwYWxvYmplY3RzLmNvbS9hcGkvY2hlY2tvdXQuanMifQ&uid=f78857e8XX&version=4&token=EC-REMOVED55S000141L&xcomponent=1#/checkout/genericError?code=SU5WQUxJRF9SRVNPVVJDRV9JRA%3D%3D
Console errors:
ppxo_unhandled_error
(“RESOURCE_NOT_FOUND\ncallGraphQL/<@https://www.paypalobjects.com/api/xo/button.js?date=2021-4-25:2741:23\npromise_ZalgoPromise</_proto.dispatch@https://…)
Uncaught Error: RESOURCE_NOT_FOUND
callGraphQL https://www.paypalobjects.com/api/xo/button.js?date=2021-4-25:2741, ….
ppxo_xc_ppbutton_error
I don’t post the full error logs but can send them on request. This is with the sandbox mode.
I had success in live mode with this code snippet in the function.php but it seems to not make a difference in sandbox mode.
/** 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');
Most important I would need to get it running with the /de/ language. I don’t need it for the /en/ language.