fc_shipping_method_has_cost
Type: Filter
Filters the shipping method has cost.
Signature
apply_filters( 'fc_shipping_method_has_cost', $value, $method );
Parameters
| Name | Type | Description |
|---|---|---|
$value | mixed | Value to filter. |
$method | \WC_Shipping_Rate | Method. |
Since
3.0.2
Source: inc/checkout-steps.php
Examples
add_filter( 'fc_shipping_method_has_cost',
/**
* Always show cost for all shipping methods.
*
* @param mixed $value Value to filter.
* @param \WC_Shipping_Rate $method Method.
* @return mixed Filtered value.
*/
function( $value, $method ) {
return true;
},
10,
2
);
See example on fc_shipping_method_option_price.
See example on fc_shipping_method_option_price_markup.