Automattic\WooCommerce\Gateways\PayPal
Notices::is_notice_dismissed
Check if the notice has been dismissed.
User meta keys for notice dismissals:
- dismissed_paypal_migration_completed_notice
- dismissed_paypal_account_restricted_notice
- dismissed_paypal_unsupported_currency_notice
The meta keys are set by WC_Admin_Notices when the notice is dismissed by the user.
Метод класса: Notices{}
Хуков нет.
Возвращает
bool.
Использование
// private - только в коде основоного (родительского) класса $result = $this->is_notice_dismissed( $notice_name ): bool;
- $notice_name(строка) (обязательный)
- The name of the notice.
Список изменений
| С версии 10.5.0 | Введена. |
Код Notices::is_notice_dismissed() Notices::is notice dismissed WC 11.2.2
private function is_notice_dismissed( string $notice_name ): bool {
return (bool) get_user_meta( get_current_user_id(), 'dismissed_' . $notice_name . '_notice', true );
}