• Resolved widecast

    (@widecast)


    Hello,

    The plugin normally gives the correct price on the checkout page.

    However, I believe I found a specific scenario that leads to double conversion.

    On my staging site, if I have the renewals set to manual, it shows the correct converted amount in the customer “Orders” page:

    https://snag.gy/iJE6Xa.jpg

    However, when I click to pay it, the price is converted a 2nd time:

    https://snag.gy/fvJmsw.jpg

    If I disable the Subscriptions plugin, and then repeat these steps, the price stays the same (as it should) when loading the checkout page.

    I’ve copied the lines of code from:

    https://currency-switcher.com/woocommerce-subscriptions-by-woocommerce/

    But that gives these PHP notices and warnings when debugging is on:

    Notice: Undefined variable: order_id in /public_html/dev/wp-content/plugins/woocommerce-subscriptions/includes/wcs-order-functions.php on line 907
    
    Warning: Cannot modify header information - headers already sent by (output started at /public_html/dev/wp-content/plugins/woocommerce-subscriptions/includes/wcs-order-functions.php:907) in /public_html/dev/wp-includes/pluggable.php on line 1251
    
    Warning: Cannot modify header information - headers already sent by (output started at /public_html/dev/wp-content/plugins/woocommerce-subscriptions/includes/wcs-order-functions.php:907) in /public_html/dev/wp-includes/pluggable.php on line 1254

    I don’t know if these problems are related, but please send me your suggestions regarding these issues.

    Thanks!

    • This topic was modified 5 years, 6 months ago by widecast.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello

    Unfortunately, your first screenshot does not work. Please describe in more detail what I must do to get this error.

    Drop me screenshots of file \woocommerce-subscriptions\includes\wcs-order-functions.php where you added a code

    Thread Starter widecast

    (@widecast)

    Hello,

    The first screenshot link is working for me. Maybe try again. It’s a screenshot of the customer’s order area showing a link to pay for their renewal payment of $13 USD. If you click the “Pay” button, you are taken to the cart but the price converts a second time to $11 USD.

    To reproduce:

    1) Install WooCommerce, WooCommerce Subscriptions, and WOOCS
    2) Set up a staging site
    3) Configure WOOCS to use a 2nd currency
    4) Create a subscription product with monthly renewal
    5) Order the subscription product in a converted price
    6) Run the renewal via Tools > Scheduled Actions (woocommerce_scheduled_subscription_payment)
    7) Go to customer panel and see the pending payment (correct price) that will have a “Pay” link. Click the link to pay.
    8) Cart/Checkout will have the double conversion (wrong price)
    9) You can disable the WooCommerce Subscriptions plugin, repeat steps 7-8, and there will be no double conversion.

    I’ve even tested this with Twenty Nineteen and all other plugins disabled (plus the Stripe gateway plugin).

    I think the PHP notice is a separate issue, but here is a screenshot of my edited wcs-order-functions.php file:

    https://snag.gy/WAGd1V.jpg

    Thank you.

    Hello

    if this does not work for you. Make an adaptation request – https://currency-switcher.com/woocs-labs/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Double Conversion with WooCommerce Subscriptions by WooCommerce’ is closed to new replies.