Action
rpress_customer_post_increase_value
On this page
Fires after a customer's lifetime value is increased.
Fires in RPRESS_Customer::increase_value() after the update attempt. The first argument is the object's current purchase value, which is unchanged if the update failed.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$purchase_value | float | The customer's lifetime value after the change. |
$value | float | The amount that was added. |
$customer_id | int | The customer ID. |
$customer | RPRESS_Customer | The customer object. |
Example#
function my_customer_post_increase_value( $purchase_value, $value, $customer_id, $customer ) {
update_option( 'my_customer_ltv_' . $customer_id, $purchase_value );
}
add_action( 'rpress_customer_post_increase_value', 'my_customer_post_increase_value', 10, 4 );
Source#
Fired from:
includes/class-rpress-customer.php(line 496), inRPRESS_Customer::increase_value()
See also#
Was this page helpful?
