Filter
rpress_customer_increase_value
On this page
Filters the amount added to a customer's lifetime value.
Runs in RPRESS_Customer::increase_value() before the value is cast with floatval() and added to the stored purchase_value. Typically called when a payment is attached to the customer.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$value | float | The amount to add. |
$customer | RPRESS_Customer | The customer object. |
Return value#
float. The amount to add to the customer lifetime value.
Example#
function my_customer_increase_value( $value, $customer ) {
return round( (float) $value, 2 );
}
add_filter( 'rpress_customer_increase_value', 'my_customer_increase_value', 10, 2 );
Source#
Applied in:
includes/class-rpress-customer.php(line 490), inRPRESS_Customer::increase_value()
See also#
Was this page helpful?
