How to define a variable already defined in a plugin function?

Question

I’m using a theme that display hotel rooms with a $ currency.
but i wish to display € as currency.

when requested the theme developper says, define currency in woocommerce.
that works great, because theme use this to display currency.

perhaps, we don’t use woocommerce on this site, so when i deactivate woocommerce, currency goes back to $ !

the theme developper has no idea on how to handle this.
So i make my search.

i do find the function that define the currency if woocommerce is not installed. It comes with a plugin linked to the theme.

    if ( ! function_exists('mkdf_hotel_room_get_currency') ) {
    /**
     * Get currency
     * @return string of currency that is used in woocommerce or default currency
     */
    function mkdf_hotel_room_get_currency() {
        $currency = '$'; // default currency if woocommerce is not installed
        if ( fivestar_mikado_is_woocommerce_installed() ) {
            $currency = get_woocommerce_currency_symbol( get_woocommerce_currency() );
        }

        return $currency;
    }
}

so now, the question, is how can i do to change this currency thru my functions.php ? i don’t want to change it in this code, to handle updates.

0
, Gregory 10 months 0 Answers 55 views 0

Leave an answer