woocommerce_evaluate_shipping_cost_args

This commit is contained in:
Mike Jolley 2016-01-11 15:51:37 +00:00
parent eb42c7b3e3
commit 934269f1e8
1 changed files with 3 additions and 5 deletions

View File

@ -67,12 +67,10 @@ class WC_Shipping_Flat_Rate extends WC_Shipping_Method {
protected function evaluate_cost( $sum, $args = array() ) { protected function evaluate_cost( $sum, $args = array() ) {
include_once( 'includes/class-wc-eval-math.php' ); include_once( 'includes/class-wc-eval-math.php' );
// Allow 3rd parties to process shipping cost arguments
$args = apply_filters( 'woocommerce_evaluate_shipping_cost_args', $args, $sum );
$locale = localeconv(); $locale = localeconv();
$decimals = array( wc_get_price_decimal_separator(), $locale['decimal_point'], $locale['mon_decimal_point'] ); $decimals = array( wc_get_price_decimal_separator(), $locale['decimal_point'], $locale['mon_decimal_point'] );
// Allow 3rd parties to process shipping cost arguments
$args = apply_filters( 'woocommerce_evaluate_shipping_cost', $args, $sum, $decimals );
$this->fee_cost = $args['cost']; $this->fee_cost = $args['cost'];
// Expand shortcodes // Expand shortcodes