Skip to content
Docs
Get RestroPress

Filter

rpress_payment_fee_keys

Updated
On this page

Filters the fee fields that RPRESS_Payment::remove_fee_by accepts as lookup keys.

remove_fee_by returns false unless the key it receives is in this list. The default keys are index, label, amount and type.

Parameters#

ParameterTypeDescription
$allowed_fee_keysstring[]Keys a fee can be looked up by.

Return value#

string[]. The allowed keys.

Example#

function my_payment_fee_keys( $allowed_fee_keys ) {
	$allowed_fee_keys[] = 'id';
	return $allowed_fee_keys;
}
add_filter( 'rpress_payment_fee_keys', 'my_payment_fee_keys' );

Source#

Applied in:

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

See also#

Was this page helpful?