Skip to content
Docs
Get RestroPress

Action

rpress_customer_pre_decrease_value

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

ParameterTypeDescription
$valuefloatThe amount being subtracted.
$customer_idintThe customer ID.
$customerRPRESS_CustomerThe 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), in RPRESS_Customer::decrease_value()

See also#

Was this page helpful?