• Hello,

    On checkout page, we noted errors on console:
    https://prnt.sc/NNedOTgRrPpS

    and, in details, it show:

    <head>
        <title>PayPal</title>
        <meta name="viewport" content="width=device-width, initial-scale=1" />
    </head>
    <body>
        <script>console.warn('paypal_messages_not_authorized',{description:'Authorization failed due to insufficient permissions.'});</script>
    </body>

    https://prnt.sc/vWHgAK_IoCs6

    Could you please let us know how to resolve? or is there any issue with our PayPal account?

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @alexliii,

    thank you for reach out to us, we are here to help.

    This error looks like it is related to server authorizations that might be implemented, not so much any setting of the plugin. I do not think there is much that can be done from the plugin’s perspective.

    Can you tell me what the outcome is of this error being shown? Is there any functionality of the plugin that is not working as intended? If that is the case, we could see what we can do. If not, I am not sure how to correct an access issue like this via our plugin.

    Let me know what you think about this.

    Kind regards,
    Joost

    Thread Starter alexliii

    (@alexliii)

    Hello,

    I just suppose it might be a bug, because it show up on any of products page, cart, checkout, but it does not show up on the home page.

    Our account is china merchant account, and we already disable PayPal later at backend, maybe it is a bug related to Pay later?

    Any one check on our product page, please

    Thanks, and let us know what you think.

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @alexliii

    We’ve further investigated this and we believe that, on the plugin level the Pay Later messaging is enabled but the merchant account is not eligible for Pay Later features.
    To disable this, you would need to first disable the Pay Later messaging configurator with this code snippet:?https://github.com/woocommerce/woocommerce-paypal-payments/wiki/Actions-and-Filters#disable-pay-later-messaging-configurator-in-260
    Then you can disable the Pay Later messaging in the Pay Later tab which should resolve these messages in the frontend.

    Please have a look and let us know if this helped you resolve the issue.

    Kind regards,
    Joost

    Thread Starter alexliii

    (@alexliii)

    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' );
    1. 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.
    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @alexliii

    This is the link you need:?Disable Pay Later messaging Configurator in 2.6.0+

    add_filter( 'woocommerce.feature-flags.woocommerce_paypal_payments.paylater_configurator_enabled', '__return_false' );

    2# Will the error be fixed natively in the next update? or should we always use the method of the above code snippet?

    You are seeing this message because your store is not configured correctly. Your WooCommerce store location is configured with a Pay Later supported region, but the actual PayPal merchant account doesn’t support it. Currently, there is a 1:1 relationship here, as the plugin is not capable of understanding if the connected merchant is eligible. When the store is configured with a Pay Later supported region, the plugin automatically defaults them on. You must first disable the configurator, as otherwise you cannot disable it in the plugin!

    I hope this answers your question.

    Kind regards,
    Joost

    Thread Starter alexliii

    (@alexliii)

    Hello,

    Thanks fore clarification.

    Here are steps of test:

    1. I check Pay later messaging before implement your code snippet, and it looks like this:
    https://prnt.sc/7rgessOO_Ufu

    2. Set the following code snippet, and set it to be “Only run in administration area”

    add_filter( 'woocommerce.feature-flags.woocommerce_paypal_payments.paylater_configurator_enabled', '__return_false' );

    Please note that codesnippet will cause serious error both for the backend and frontend, and here is test:

    (1) Only run in administration area:
    https://prnt.sc/YggT_bmWL4B8

    then access to any backend pages:

    https://mysite.com/wp-admin/index.php

    Screenshot:

    https://prnt.sc/ffqZIe-NeHvY

    https://mysite.com/wp-admin/plugins.php

    Screenshot:

    https://prnt.sc/NVW0bGBp85lQ

    (2) If set it to be Only run on site front-end:

    https://prnt.sc/vbGvHOTlwk8F

    then access to the frontend page:

    https://prnt.sc/wwWKCeGaK4yW

    So, mostly, this code snippet does not match this plugin with theversion 2.7.1, right?

    Looking forward to your clarification.

    Thanks

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @alexliii

    sorry for the wait, we have to take a closer look at this, as it seems we made changes that broke this filter. I got some new option for you to try

    1. Downgrade PCP to version 2.6.0
    2. Add the filter (which caused the error for you earlier)
    3. Then disable all Pay Later messaging locations on the Pay Later tab
    4. remove the filter
    5. update plugin again to latest version

    Can you try this and let us know if this option does work out?

    Kind regards,
    Joost

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.