• Resolved Payment Plugins

    (@mrclayton)


    Hi Dev Support,

    I am attempting to make my plugin compatible with yours but running in to some issues.

    Here is a scenario which currently does not work:

    1. Customer selects GPay on checkout page which opens the GPay wallet.
    2. Customer selects a shipping address in the GPay wallet which triggers an ajax request to update the customer’s billing/shipping address.
    3. The checkout page updates correctly via the update_order_review ajax request but the response to the GPay wallet ajax request is the old currency.

    Reviewing your code, I see there are certain scenarios in which you include the frontend filters that hook in to woocommerce_currency etc. Do you have any docs or suggestions on how I might go about making your plugin work in this scenario?

    One of the issues I see is that in WC_Product_Price_Based_Country::frontend_init you assign the current_zone based on the customer’s current billing or shipping country. However that occurs in the woocommerce_init action but dictates all behavior downstream. In my scenario, the customer’s billing country is ‘US’ during woocommerce_init and then ‘GB’ once the ajax request is processed and WC()->cart->caluclate_totals() is called. But, due to how your plugin is initialized, the new country isn’t taken into consideration.

    Any suggestions you have are appreciated.

    Kind Regards,

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Compatibility with payment gateways’ is closed to new replies.