• Resolved Oklopnik

    (@oklopnik)


    Hello,

    On our web site, we have 2 optional features for our users to pick.
    One is “product personalization” and the other one is “gift wrap”.
    Both features are implemented as custom fee using functions and WooCommerce hooks.

    The price for product personalization can be set per product.
    The price for gift wrapping is global (same for all products).

    So, before we started using this plugin, if the product price was 500 RSD and personalization was 300 RSD, the total would be 800 RSD.

    However, after we started using this plugin, if the product price was 500 RSD ($5) and personalization was 300 RSD ($3), the total would be $800.

    We can setup additional fields for personalization and gift wrapping prices for USD and EUR, but can you help us with what needs to be changed in our code, so the price is calculated properly?

    Thank you in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Oklopnik

    (@oklopnik)

    Oscar, can you help, please?

    I’ve taken another look at the code.

    If there’s a way for me to get the currency from your code, I could then adjust my pricing by the currency.

    I’ve checked if you’re changing the WooCommerce currency and that’s not the case. So, I guess you’re tracking the currency on your own? Is there a way to get the currency from your plugin?

    • This reply was modified 4 years, 11 months ago by Oklopnik.
    Plugin Author Oscar Gare

    (@oscargare)

    Hi,
    the function wcpbc_the_zone() returns the current pricing zone (a WCPBC_Pricing_Zone object). If there is no pricing zone (i.e the current country does not match in a pricing zone), the function will return false.
    you can find the function in the core-functions file.

    Thread Starter Oklopnik

    (@oklopnik)

    @oscargare Thank you, I will try it and let you know if I have any issues!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom fees are not working’ is closed to new replies.