Action
rpress_customer_pre_decrease_purchase_count
On this page
Fires before a customer's purchase count is decreased.
Fires in RPRESS_Customer::decrease_purchase_count() after the amount has been validated, before the purchase_count column is updated. The new total is floored at zero.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$count | int | The amount the purchase count is decreased by. |
$customer_id | int | The customer ID. |
$customer | RPRESS_Customer | The customer object. |
Example#
function my_customer_pre_decrease_purchase_count( $count, $customer_id, $customer ) {
error_log( 'Customer ' . $customer_id . ' count -' . $count );
}
add_action( 'rpress_customer_pre_decrease_purchase_count', 'my_customer_pre_decrease_purchase_count', 10, 3 );
Source#
Fired from:
includes/class-rpress-customer.php(line 475), inRPRESS_Customer::decrease_purchase_count()
See also#
Was this page helpful?
