Content of the page

WooCommerce Dynamic Pricing & Discounts v.2.1 – RightPress


Content of the article

Plugin link: https://codecanyon.net/item/woocommerce-dynamic-pricing-discounts/7119279

  • open file \wp-content\plugins\wc-dynamic-pricing-and-discounts\extensions\promotion-volume-pricing-table\rp-wcdpd-promotion-volume-pricing-table.class.php and add next code:
    if (class_exists('WOOCS') AND $quantity_range['pricing_method'] == 'discount__amount') {
        global $WOOCS;
        $quantity_range['pricing_value'] = $WOOCS->woocs_exchange_value(floatval($quantity_range['pricing_value']));
    }

  • in file plugins\wc-dynamic-pricing-and-discounts\classes\controllers\rp-wcdpd-controller-methods-product-pricing.class.php add next code:
    if (class_exists('WOOCS')) {
        global $WOOCS;
        $initial_price = $WOOCS->woocs_exchange_value(floatval($initial_price));
    }

  • in file \wp-content\plugins\wc-dynamic-pricing-and-discounts\templates\volume-pricing-table\vertical.php add code:
    if (class_exists('WOOCS')) {
        global $WOOCS;
        if ($WOOCS->is_multiple_allowed) {
            $display_price = $WOOCS->woocs_exchange_value(floatval($current_single['table_data'][$range_key]["price_raw"]));
            echo wc_price($display_price);
        }
    } else {
        echo $current_single['table_data'][$range_key]['range_price'];
    }

 

Faster WordPress HostingWPBE - WordPress Posts Bulk Editor Professional