Filter
rpress_item_quantities_enabled
On this page
Filters whether item quantities are enabled.
Runs in rpress_item_quantities_enabled(), which reads the item_quantities setting and casts it to a boolean. It gates the Update Cart button and the quantity column in the admin order details.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$ret | bool|mixed | Value of the item_quantities setting. |
Return value#
bool. True when item quantities are enabled.
Example#
function my_item_quantities_enabled( $ret ) {
return true;
}
add_filter( 'rpress_item_quantities_enabled', 'my_item_quantities_enabled', 10, 1 );
Source#
Applied in:
includes/cart/functions.php(line 100), inrpress_item_quantities_enabled()
Was this page helpful?
