Automattic\WooCommerce\Gateways\PayPal
Notices::add_paypal_notices
Add PayPal Standard notices.
Method of the class: Notices{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Notices = new Notices(); $Notices->add_paypal_notices(): void;
Changelog
| Since 10.5.0 | Introduced. |
Notices::add_paypal_notices() Notices::add paypal notices code WC 10.7.0
public function add_paypal_notices(): void {
// Show only to users who can manage the site.
if ( ! current_user_can( 'manage_woocommerce' ) && ! current_user_can( 'manage_options' ) ) {
return;
}
// Skip if the gateway is not available or the merchant has not been onboarded.
if ( ! PayPalHelper::is_paypal_gateway_available() || ! $this->gateway->should_use_orders_v2() ) {
return;
}
$this->add_paypal_migration_notice();
$this->add_paypal_account_restricted_notice();
$this->add_paypal_unsupported_currency_notice();
}