From 8dc4b1609dde01f5a3c42cadbda6b4c82e9cd400 Mon Sep 17 00:00:00 2001 From: Tanmay Kirtania Date: Thu, 15 Jul 2021 08:49:27 +0600 Subject: [PATCH] Added limited time offer notice on summer sale (#417) * Added limited time offer notice on summer sale * Updated offer key option field --- core/Promotions/Offers.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/Promotions/Offers.php b/core/Promotions/Offers.php index 8827ed1c7..cbdff1265 100644 --- a/core/Promotions/Offers.php +++ b/core/Promotions/Offers.php @@ -19,14 +19,14 @@ public function get_offer() { $current_time = new \DateTimeImmutable( 'now', new \DateTimeZone('America/New_York') ); $disabled_key = get_option( 'pm_offer_notice' ); - $promotion1_start = $current_time->setDate( '2021', '05', '11' )->setTime( '09', '00', '00' ); - $promotion1_end = $current_time->setDate( '2021', '05', '24' )->setTime( '23', '59', '59' ); + $promotion1_start = $current_time->setDate( '2021', '07', '16' )->setTime( '09', '00', '00' ); + $promotion1_end = $current_time->setDate( '2021', '07', '26' )->setTime( '23', '59', '59' ); if ( $current_time >= $promotion1_start && $current_time <= $promotion1_end ) { - $offer->status = $disabled_key == 'pm_eid_offer_2021' ? false : true; - $offer->message = __( 'Eid Mubarak!
Stay Safe & Spread Happiness.
Enjoy up to 45% OFF on WP Project Manager Pro.', 'wedevs-project-manager' ); - $offer->link = 'https://wedevs.com/wp-project-manager-pro/pricing?utm_medium=text&utm_source=wordpress-wppm-eidoffer2021'; - $offer->key = 'pm_eid_offer_2021'; + $offer->status = $disabled_key == 'pm_summer_sale_offer_2021' ? false : true; + $offer->message = __( 'Summer Sale!
Chill out with weDevs.
Enjoy up to 40% OFF on WP Project Manager Pro.', 'wedevs-project-manager' ); + $offer->link = 'https://wedevs.com/wp-project-manager-pro/pricing?utm_medium=text&utm_source=wordpress-wppm-summer-sale2021'; + $offer->key = 'pm_summer_sale_offer_2021'; return $offer; }