Filter
rpress_payments_stripe_wallets_enabled
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#
| Parameter | Type | Description |
|---|---|---|
$enabled | bool | Whether 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), inrpress_payments_stripe_wallets_enabled()
See also#
Was this page helpful?
