• Resolved karimaljandali

    (@karimaljandali)


    In the past few days, a client has been having trouble purchasing shipping labels. The error code when purchase is attempted is “Error: The WooCommerce Shipping & Tax server returned: Bad Request Only USD currency is accepted at the moment ( 400 )”. I tried looking up the error message to see if anyone else has had similar issues but couldn’t find anything related to it.

    We are running WP 5.7.1, PHP 7.4, and up to date plugins.

    Any thoughts on what could be causing this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @karimaljandali !

    In order to purchase a shipping label, your store’s setting need to be set up with United States Dollar as currency.
    You can find the currency in WooCommerce > Settings > General > Currency : https://d.pr/i/mHupMG.
    After that setting has been changed to a supported value, you should be able to purchase labels.

    Let me know if this helps!

    Have a good one!

    Francesco

    Thread Starter karimaljandali

    (@karimaljandali)

    Hi @frosso1,

    Thanks for the reply! I checked the settings and it looks like we do actually have this set correctly – https://www.screencast.com/t/q3XQTobOw

    I know that the site is also selling to Canada and accepts Canadian Dollars but the purchase I was trying to create a shipping label for was purchased in the U.S. using U.S. dollars, so I am not sure how that would be conflicting with it.

    Thanks for the quick followup and for checking!

    I know that the site is also selling to Canada and accepts Canadian Dollars but the purchase I was trying to create a shipping label for was purchased in the U.S. using U.S. dollars, so I am not sure how that would be conflicting with it.

    That’s interesting, can you please confirm if and which plugin is being used to handle multiple currencies?
    Unfortunately the currency the order has been set up with shouldn’t influence this – the message is displayed based on the currency set up on the store. Maybe something is affecting the woocommerce_currency filter.

    Thanks again!

    Thread Starter karimaljandali

    (@karimaljandali)

    Hey @frosso1,

    It looks like the plugins are from Aeliahttps://www.screencast.com/t/kEMraxvt4Ma3

    Thanks!

    Hi @karimaljandali ,

    Thank you, that’s really useful!
    It sounds like this is a compatibility issue. Unfortunately we don’t provide support for this external plugin.
    It seems that the Aelia plugin is affecting the value returned by the get_woocommerce_currency() WooCommerce function when interacting with the backend (/wp-admin) area.

    If you’re comfortable with development, I noticed that Aelia has a support page to alter the currency being used, so maybe it’s something they’re already familiar with.
    I am guessing that the currency should not be set when the admin is making a backend request.

    As an alternative, I would recommend reaching out to the Aelia plugin developers for guidance on this: https://aelia.co/contact/
    The issue is that the value returned by the get_woocommerce_currency() function is being altered when making a label purchase request: https://github.com/Automattic/woocommerce-services/blob/trunk/classes/class-wc-connect-api-client.php#L465

    I hope this helps to get you on the right track!

    Thanks again!

    Francesco

    Thread Starter karimaljandali

    (@karimaljandali)

    @frosso1 thank you so much! I appreciate you going above and beyond helping me figure out the cause of the issue. I’ll try to fix the function myself for admin users, but I will reach out to their support should I need additional help.

    Have a great day!

    It’s my pleasure @karimaljandali !
    I’m going to mark this topic as resolved, but feel free to open a new one if you encounter any other issues.

    In the meantime. have a great rest of your week!

    Francesco

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Bad Request Only USD currency is accepted at this moment’ is closed to new replies.