Action
rpress_customer_pre_decrease_value
On this page
Fires before a customer's lifetime value is decreased.
Fires in RPRESS_Customer::decrease_value() after the amount has been filtered, before the purchase_value column is updated.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$value | float | The amount being subtracted. |
$customer_id | int | The customer ID. |
$customer | RPRESS_Customer | The customer object. |
Example#
function my_customer_pre_decrease_value( $value, $customer_id, $customer ) {
error_log( 'Customer ' . $customer_id . ' value -' . $value );
}
add_action( 'rpress_customer_pre_decrease_value', 'my_customer_pre_decrease_value', 10, 3 );
Source#
Fired from:
includes/class-rpress-customer.php(line 512), inRPRESS_Customer::decrease_value()
See also#
Was this page helpful?
