Use GMT timestamp when comparing expiry

This commit is contained in:
Claudiu Lodromanean 2017-03-13 13:40:58 -07:00
parent 7d9227d3af
commit 258845fb7b
1 changed files with 1 additions and 1 deletions

View File

@ -792,7 +792,7 @@ class WC_Coupon extends WC_Legacy_Coupon {
* @throws Exception
*/
private function validate_expiry_date() {
if ( $this->get_date_expires() && current_time( 'timestamp' ) > $this->get_date_expires()->getTimestamp() ) {
if ( $this->get_date_expires() && current_time( 'timestamp', true ) > $this->get_date_expires()->getTimestamp() ) {
throw new Exception( $error_code = self::E_WC_COUPON_EXPIRED );
}
}