WC_Product_Usage_Notice::ajax_remind_later()
AJAX handler for "remind later" action of product usage notice.
Метод класса: WC_Product_Usage_Notice{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$result = WC_Product_Usage_Notice::ajax_remind_later();
Код WC_Product_Usage_Notice::ajax_remind_later() WC Product Usage Notice::ajax remind later WC 9.4.2
public static function ajax_remind_later() { if ( ! check_ajax_referer( 'remind_later_product_usage_notice' ) ) { wp_die( -1 ); } $user_id = get_current_user_id(); if ( ! $user_id ) { wp_die( -1 ); } $product_id = absint( $_GET['product_id'] ?? 0 ); if ( ! $product_id ) { wp_die( -1 ); } update_user_meta( $user_id, self::REMIND_LATER_TIMESTAMP_META_PREFIX . $product_id, time() ); wp_die( 1 ); }