Skip to content
Docs
Get RestroPress

Filter

rpress_customer_increase_value

Updated
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#

ParameterTypeDescription
$valuefloatThe amount to add.
$customerRPRESS_CustomerThe 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), in RPRESS_Customer::increase_value()

See also#

Was this page helpful?