Skip to content
Docs
Get RestroPress

Action

rpress_customer_pre_increase_purchase_count

Updated
On this page

Fires before a customer's purchase count is increased.

Fires in RPRESS_Customer::increase_purchase_count() after the amount has been validated, before the purchase_count column is updated.

Parameters#

ParameterTypeDescription
$countintThe amount the purchase count is increased by.
$customer_idintThe customer ID.
$customerRPRESS_CustomerThe customer object.

Example#

function my_customer_pre_increase_purchase_count( $count, $customer_id, $customer ) {
	error_log( 'Customer ' . $customer_id . ' count +' . $count );
}
add_action( 'rpress_customer_pre_increase_purchase_count', 'my_customer_pre_increase_purchase_count', 10, 3 );

Source#

Fired from:

  • includes/class-rpress-customer.php (line 452), in RPRESS_Customer::increase_purchase_count()

See also#

Was this page helpful?