FOX - Professionnel du commutateur de devises WooCommerce

Nommez votre prix – WooThemes

Lien du pluginhttps://woocommerce.com/products/name-your-price/

Dans le fichier plugins\nom-woocommerce-votre-prix\comprend\classe-wc-nom-votre-prix-panier.php ajouter le code suivant:

if (class_exists('WOOCS')) { global $WOOCS ; if ($WOOCS->current_currency != $WOOCS->default_currency) { $currencies = $WOOCS->get_currencies(); $posted_price = $posted_price / $currencies[$WOOCS->current_currency]['rate'] ; } }

Ancienne version:

  • dans le fichier \wp-content\plugins\woocommerce-nom-votre-prix\comprend\classe-wc-nom-votre-aides-prix.php ajouter du code :
    if (class_exists('WOOCS')) { global $WOOCS; if ($WOOCS->is_multiple_allowed) { $price = $WOOCS->woocs_exchange_value(floatval($price)); } }

  • dans le même fichier ajoutez le code :
    if (class_exists('WOOCS')) { global $WOOCS; if ($WOOCS->current_currency != $WOOCS->default_currency) { $currencies = $WOOCS->get_currencies(); $posted = $posted / $currencies[$WOOCS->current_currency]['rate'] ; } }

  • dans le même code ajoutez le code :
    if (class_exists('WOOCS')) { global $WOOCS; if ($WOOCS->is_multiple_allowed) { $price = $WOOCS->woocs_exchange_value(floatval($price)); } }

  • dans le même code ajoutez le code :
    if (class_exists('WOOCS')) { global $WOOCS; $prix = $WOOCS->woocs_exchange_value(floatval($price)); $minimum = $WOOCS->woocs_exchange_value(floatval($minimum)); }

  • fichier ouvert plugins\nom-woocommerce-votre-prix\comprend\classe-wc-nom-votre-prix-panier.php et ajoutez le code suivant :
    $price = (double) WC_Name_Your_Price_Helpers::standardize_number($_REQUEST[$posted_nyp_field]); if (class_exists('WOOCS')) { global $WOOCS; if ($WOOCS->current_currency != $WOOCS->default_currency) { $currencies = $WOOCS->get_currencies(); $price = $price / $currencies[$WOOCS->current_currency]['rate'] ; } } $cart_item_data['nyp'] = $prix;
    

    ET

    if (class_exists('WOOCS')) { global $WOOCS; $minimum = $WOOCS->woocs_exchange_value(floatval($minimum)); }