Skip to content
Docs
Get RestroPress

Filter

rpress_payments_stripe_wallets_enabled

Updated
On this page

Filters whether the Stripe wallet button is offered.

Runs in rpress_payments_stripe_wallets_enabled(). The value is true only when Stripe is available and active, the stripe_wallets setting is not 'hide', and both a publishable key and a secret key are present. Return false to hide the wallet button.

Parameters#

ParameterTypeDescription
$enabledboolWhether the wallet button is offered.

Return value#

bool. True to offer the wallet button.

Example#

function my_disable_wallets( $enabled ) {
	return $enabled && ! is_user_logged_in();
}
add_filter( 'rpress_payments_stripe_wallets_enabled', 'my_disable_wallets' );

Source#

Applied in:

  • includes/features/payments/stripe-wallets.php (line 46), in rpress_payments_stripe_wallets_enabled()

See also#

Was this page helpful?