Skip to content
Docs
Get RestroPress

Filter

rpress_decrease_store_earnings_on_pending

Updated
On this page

Filters whether moving a payment back to pending reduces store earnings.

Applied in RPRESS_Payment::process_pending and passed to maybe_alter_stats. Return false to leave store earnings unchanged when a completed payment goes back to a pending or processing status.

Parameters#

ParameterTypeDescription
$decreaseboolTrue to reduce the value. The default is true.
$paymentRPRESS_PaymentThe payment object.

Return value#

bool. Whether to reduce the value.

Example#

function my__decrease_store_earnings_on_pending( $decrease, $payment ) {
	return false;
}
add_filter( 'rpress_decrease_store_earnings_on_pending', 'my__decrease_store_earnings_on_pending', 10, 2 );

Source#

Applied in:

  • includes/payments/class-rpress-payment.php (line 1699), in RPRESS_Payment::process_pending()

See also#

Was this page helpful?