FOX - Professionnel du commutateur de devises WooCommerce

Modules complémentaires de produit YITH WooCommerce

URL du plug-in: https://wordpress.org/plugins/yith-woocommerce-product-add-ons/

Dans le fichier functions.php du thème WordPress actuel ajoutez le code suivant :

add_filter('yith_wapo_get_addon_price', fonction ($price, $do, $price_method, $price_type, $index) {
    if (class_exists('WOOCS') AND $price > 0 AND 'pourcentage' !== $price_type AND 'multiplied' !== $price_type) {
        $ WOOCS global ;
        $prix = $WOOCS->woocs_exchange_value(floatval($prix));
    }
    retourner le prix $ ;
}, 99, 5);

add_filter('yith_wapo_get_addon_sale_price', fonction ($prix, $do, $price_method, $price_type, $index) {
    if (class_exists('WOOCS') AND $price > 0 AND 'pourcentage' !== $price_type AND 'multiplied' !== $price_type) {
        $ WOOCS global ;
        $prix = $WOOCS->woocs_exchange_value(floatval($prix));
    }
    retourner le prix $ ;
}, 99, 5);

add_filter('yith_wapo_total_item_price', fonction ($total_options_price) {
    if (class_exists('WOOCS') AND $total_options_price) {
        $ WOOCS global ;
        si ($WOOCS->is_multiple_allowed) {
            $currrent = $WOOCS->current_currency;
            if ($currrent != $WOOCS->default_currency) {
                $monnaies = $WOOCS->get_currencies();
                $rate = $currencies[$currrent]['rate'];
                $total_options_price = $total_options_price / $rate ;
            }
        }
    }
    retourner $total_options_price ;
});