diff --git a/tests/unit-tests/coupon/coupon.php b/tests/unit-tests/coupon/coupon.php index 1cf6411dc41..7476c0fa054 100644 --- a/tests/unit-tests/coupon/coupon.php +++ b/tests/unit-tests/coupon/coupon.php @@ -266,7 +266,7 @@ class WC_Tests_Coupon extends WC_Unit_Test_Case { $expired_coupon->set_date_created( time() - 20 ); $expired_coupon->set_date_modified( time() - 20 ); - $this->assertInstanceOf( WC_DateTime::class, $valid_coupon->get_date_created() ); + $this->assertInstanceOf( 'WC_DateTime', $valid_coupon->get_date_created() ); $this->assertTrue( $valid_coupon->is_valid() ); $this->assertFalse( $expired_coupon->is_valid() ); $this->assertEquals( $expired_coupon->get_error_message(), $expired_coupon->get_coupon_error( WC_Coupon::E_WC_COUPON_EXPIRED ) );