Content of the page

WooCommerce Bulk Discount


Content of the article

Plugin link: https://wordpress.org/plugins/woocommerce-bulk-discount/

  • open file: \wp-content\plugins\woocommerce-bulk-discount\woocommerce-bulk-discount.php
  • add next code:
    if (class_exists('WOOCS')) {
        global $WOOCS;
        if ($WOOCS->is_multiple_allowed) {
            $coeff = $WOOCS->woocs_exchange_value(floatval($coeff));
        }
    }

  • add code:
    $price_t = $this->discount_coeffs[$this->get_actual_id($_product)]['orig_price'];
    if (class_exists('WOOCS')) {
        global $WOOCS;
        $currrent = $WOOCS->current_currency;
        if ($currrent != $WOOCS->default_currency) {
            $currencies = $WOOCS->get_currencies();
            $rate = $currencies[$currrent]['rate'];
            $price_t = $price_t / ($rate);
        }
    }

  • add code:
    if (class_exists('WOOCS')) {
        global $WOOCS;
        $currrent = $WOOCS->current_currency;
        if ($currrent != $WOOCS->default_currency) {
            $currencies = $WOOCS->get_currencies();
            $rate = $currencies[$currrent]['rate'];
            $row_base_price = $row_base_price  / ($rate);
        }
    }

 

Faster WordPress Hosting