0 && $now - $since < $ttl ) { return false; } update_post_meta( $product_id, $meta_key, $now ); return true; } /** * Снимает отметку. * * @param int $product_id Id товара. * @param string $meta_key Поле меты отметки. * @return void */ public static function release( int $product_id, string $meta_key ): void { delete_post_meta( $product_id, $meta_key ); } }