• Resolved supportadtribes

    (@supportadtribes)


    Hi,

    We are running a popular product feed plugin and am trying to add Curcy compatibility in our plugin (https://www.ads-software.com/plugins/woo-product-feed-pro/). We suspect we might have find the proper filter in your plugin code to convert product prices from one currency to another. This is the piece of code we are testing:

    $from_currency = “GBP”;

    $product_data[‘wmc_price’] = apply_filters(‘wmc_get_price’, $product_data[‘price’], $from_currency);

    It however does nothing with the product price, it is not returning the GBP price of a product, instead it just leaves it in the default EUR currency. Can you give us some pointers as to how to make this work?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter supportadtribes

    (@supportadtribes)

    Would be nice if we can add support for your plugin in one of our upcoming releases. Looking forward to a reply ??

    Plugin Support angelagrey

    (@angelagrey)

    Hi,

    Thank you for reaching out to us.

    I’m afraid the filter can’t help you fully achieve that. Instead, you may use the function:

    wmc_get_price()

    Best regards.

    Thread Starter supportadtribes

    (@supportadtribes)

    Thanks, that indeed worked!

    Do you also have such a function available we can use to get the configured currencies from Curcy? So a list / array that holds the currency codes an user configured (such as GBP, EUR, USD, and so on?)

    Thread Starter supportadtribes

    (@supportadtribes)

    Can you help us out with this so we can continue the implementation?

    Plugin Support angelagrey

    (@angelagrey)

    Hi,

    Sorry for the delayed reply.

    All the params in our plugin settings is in the $setting below:

    	$setting = null;
    	if ( class_exists( 'WOOMULTI_CURRENCY_Data' ) ) {
    		$setting = \WOOMULTI_CURRENCY_Data::get_ins();
    	} elseif ( class_exists( 'WOOMULTI_CURRENCY_F_Data' ) ) {
    		$setting = \WOOMULTI_CURRENCY_F_Data::get_ins();
    	}
    
    	if ( $setting ) {
    		$setting->get_currencies();
    	}

    In addition, you may find the needed function in our plugin code.

    • This reply was modified 1 year, 9 months ago by angelagrey.
    Thread Starter supportadtribes

    (@supportadtribes)

    Thanks for your help on this, very much appreciated!

    We have just pushed out a release that is supporting Curcy so users can create product feeds using multiple currencies. See: https://adtribes.io/curcy-currency-switcher-feature/

    Plugin Support angelagrey

    (@angelagrey)

    Hi,

    Thank you for the update. I’m glad to know that and really appreciate your work. Will add your plugin to our Compatible plugin list on product page.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘PHP filter to get currency prices’ is closed to new replies.