WC_Product_Usage_Notice::is_notice_throttled()
Check whether current notice is throttled for the user and product.
Метод класса: WC_Product_Usage_Notice{}
Хуков нет.
Возвращает
true|false
.
Использование
$result = WC_Product_Usage_Notice::is_notice_throttled( $user_id, $product_id ): bool;
- $user_id(int) (обязательный)
- User ID.
- $product_id(int) (обязательный)
- Product ID.
Код WC_Product_Usage_Notice::is_notice_throttled() WC Product Usage Notice::is notice throttled WC 9.4.2
private static function is_notice_throttled( int $user_id, int $product_id ): bool { return self::is_remind_later_clicked_recently( $user_id, $product_id ) || self::has_reached_max_dismissals( $user_id, $product_id ) || self::is_any_notices_dismissed_recently( $user_id ) || self::is_product_notice_dismissed_recently( $user_id, $product_id ); }