WOOCS - Sélecteur de devise WooCommerce

WP Crowdfunding

L'URL du plug-in: https://wordpress.org/plugins/wp-crowdfunding/

  • dans le fichier \wp-content\plugins\wp-crowdfunding\wpneomodèle\woocommerce\basic\include\fonds-levé.php changer de code :
    woocs_exchange_value(floatval($amount)); $order_total = $WOOCS->woocs_exchange_value(floatval($order_total)); } ?>

  • dans le fichier \wp-content\plugins\wp-crowdfunding\includes\wpneo-crowdfunding-modèle-functions.php ajouter du code :
    if (class_exists('WOOCS')) { $query1 = "SELECT * FROM { $wpdb->prefix }woocommerce_order_itemmeta woim LEFT JOIN { $wpdb->prefix }woocommerce_order_items oi ON woim.order_item_id = oi.order_JOIN_id { ->prefix }posts wpposts ON order_id = wpposts.ID LEFT JOIN { $wpdb->prefix }woocommerce_order_itemmeta ltoim ON ltoim.order_item_id = oi.order_item_id AND ltoim.meta_key = '_line_total' O_wo_key ='.meta meta_value IN ($placeholders) AND wpposts.post_status = 'wc-completed';"; $orders = $wpdb->get_results($wpdb->prepare($query1, $campaign_ids)); $sum_price = 0 ; $ WOOCS global ; $currencies = $WOOCS->get_currencies(); foreach ($orders as $order) { $amout = $order->meta_value; $order_id = $order->order_id; $_order_currency = get_post_meta($order_id, '_order_currency', true); $order_rate = get_post_meta($order_id, '_woocs_order_rate ', true); if (!$order_rate) { if (isset($currencies[$_order_currency])) { $order_rate = $currencies[$_order_currency]['rate']; } else { continuer; } }if ($_order_currency != $WOOCS->default_currency) { $sum_price += $WOOCS->back_convert(floatval($amout), $order_rate, 4); } else { $sum_price += floatval($amout); } } return $sum_price; }
    
    

  • dans le fichier \wp-content\plugins\wp-crowdfunding\comprend\woocommerce\class-wpneo-crochet-front-end.php ajouter du code:
    if (class_exists('WOOCS')) { global $WOOCS; $raisé = $WOOCS->woocs_exchange_value(floatval($raisé)); $funding_goal = $WOOCS->woocs_exchange_value(floatval($funding_goal)); }

  • ET ajoutez le code :
    if (class_exists('WOOCS')) { $query1 = "SELECT * FROM {$wpdb->prefix}woocommerce_order_itemmeta woim LEFT JOIN {$wpdb->prefix}woocommerce_order_items oi ON {woim.order_item_id = oi.order_item_id$ LEFT JO ->prefix}posts wpposts ON order_id = wpposts.ID LEFT JOIN {$wpdb->prefix}woocommerce_order_itemmeta ltoim ON ltoim.order_item_id = oi.order_item_id ET ltoim.meta_key = '_line_total' O woim = ET'_meta_key meta_value IN ($placeholders) AND wpposts.post_status = 'wc-completed';"; $orders = $wpdb->get_results($wpdb->prepare($query1, $campaign_ids)); $sum_price = 0 ; $ WOOCS global ; $currencies = $WOOCS->get_currencies(); foreach ($orders as $order) { $amout = $order->meta_value; $order_id = $order->order_id; $_order_currency = get_post_meta($order_id, '_order_currency', true); $order_rate = get_post_meta($order_id, '_woocs_order_rate', true); if (!$order_rate) { if (isset($currencies[$_order_currency])) { $order_rate = $currencies[$_order_currency]['rate']; } else { continuer; } }if ($_order_currency != $WOOCS->default_currency) { $sum_price += $WOOCS->back_convert(floatval($amout), $order_rate, 4); } else { $sum_price += floatval($amout); } } return $sum_price; }
    

  • dans le fichier wp-content\plugins\wp-crowdfunding\wpneomodèle\woocommerce\basic\include\fonds-campagne-btn.php ajouter du code
    if (class_exists('WOOCS')) { global $WOOCS; $recomanded_price = $WOOCS->woocs_exchange_value(floatval($recomanded_price)); $min_price = $WOOCS->woocs_exchange_value(floatval($min_price)); $max_price = $WOOCS->woocs_exchange_value(floatval($max_price)); }

  • dans le fichier \wp-content\plugins\wp-crowdfunding\comprend\woocommerce\class-wpneo-crowdfunding.php ajouter du code :
    if (class_exists('WOOCS')) { global $WOOCS; if ($WOOCS->current_currency != $WOOCS->default_currency) { $currencies = $WOOCS->get_currencies(); $donate_amount = $donate_amount / $currencies[$WOOCS->current_currency]['rate'] ; } }