Filter
rpress_flat_delivery_fee_active
On this page
Filters whether the built-in flat delivery fee is active.
The flat delivery fee is only applied when this returns true. It defaults to true unless the RP_Delivery_Fee class exists, because the Delivery Fee extension replaces the flat fee when it is loaded. Return false to disable the flat fee and its settings field.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$active | bool | True when the RP_Delivery_Fee class does not exist. |
Return value#
bool. True to use the built-in flat delivery fee.
Example#
function my_disable_flat_delivery_fee( $active ) {
return false;
}
add_filter( 'rpress_flat_delivery_fee_active', 'my_disable_flat_delivery_fee' );
Notes#
The registered settings field for the flat fee is also hidden when this returns false.
Source#
Applied in:
includes/rp-delivery-fee-basic.php(line 28), inrpress_flat_delivery_fee_active()
See also#
Was this page helpful?
