1, 'option_name' => 'trial_to_premium_notice', 'action' => $notice_optin_action, ), $referer ), 'es_dismiss_admin_notice' ); $notice_optout_action = 'ig_es_trial_to_premium_dismiss'; $optout_url = wp_nonce_url( add_query_arg( array( 'es_dismiss_admin_notice' => 1, 'option_name' => 'trial_to_premium_notice', 'action' => $notice_optout_action, ), $referer ), 'es_dismiss_admin_notice' ); $remaining_trial_days = ES()->trial->get_remaining_trial_days(); $day_or_days = _n( 'day', 'days', $remaining_trial_days, 'email-subscribers' ); $discount_messages = array( 'bfcm' => array( 'message' => __( 'Get flat 50% discount on annual plan if you upgrade now!
No coupon code required. Discount will be applied automatically.', 'email-subscribers' ), ), ); $offer_type_to_show = 'trial'; $offers_date_ranges = array( 'bfcm' => array( 'start_date' => '2022-11-23 7:00:00', 'end_date' => '2022-11-30 7:00:00', ), ); foreach ( $offers_date_ranges as $offer_type => $offer_dates ) { $offer_start_date = $offer_dates['start_date']; $offer_end_date = $offer_dates['end_date']; if ( ( $ig_current_date >= strtotime( $offer_start_date ) ) && ( $ig_current_date <= strtotime( $offer_end_date ) ) ) { $offer_type_to_show = $offer_type; break; } } $trial_expiration_message = ''; if ( $remaining_trial_days > 1 ) { /* translators: 1. Remaining trial days. 2. day or days text based on number of remaining trial days. */ $trial_expiration_message = sprintf( __( 'Your free trial is going to expire in %1$s %2$s.', 'email-subscribers' ), $remaining_trial_days, $day_or_days ); } else { $trial_expiration_message = __( 'Today is the last day of your free trial.', 'email-subscribers' ); } // Add default value to message. /* translators: 1. Discount % 2. Premium coupon code */ $discount_message = sprintf( __( 'Get flat %1$s discount if you upgrade now!
Use coupon code %2$s during checkout.', 'email-subscribers' ), '10%', 'PREMIUM10' ); $offer_cta_optin_text = __( 'Upgrade now', 'email-subscribers' ); $offer_cta_optout_text = __( 'No, it\'s ok', 'email-subscribers' ); // Override offer message with current active offer message. if ( ! empty( $discount_messages[ $offer_type_to_show ] ) ) { $discount_message = ! empty( $discount_messages[ $offer_type_to_show ]['message'] ) ? $discount_messages[ $offer_type_to_show ]['message'] : $discount_message; } /* translators: 1. Trial expiration message. 2. Discount message. */ $offer_message = sprintf( __( 'Hi there,
Hope you are enjoying Icegram Express MAX trial.
%1$s
Upgrade now to continue uninterrupted use of premium features like block fake signups, prevent bot attacks, broadcast scheduling, automatic email sending, detailed campaign report, prevent emails from going to spam & lot more....
%2$s', 'email-subscribers' ), $trial_expiration_message, $discount_message ); ?>