Skip to content
Docs
Get RestroPress

Filter

rpress_item_quantities_enabled

Updated
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#

ParameterTypeDescription
$retbool|mixedValue 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), in rpress_item_quantities_enabled()
Was this page helpful?