1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253
<?php
class orddd_lite_pro_notices {
public static function orddd_lite_notices_of_pro() {
$orddd_lite_activate_time = get_option ( 'orddd_lite_activate_time' );
$orddd_lite_sixty_days = strtotime( '+60 Days', $orddd_lite_activate_time );
$current_time = current_time( 'timestamp' );
if( !is_plugin_active( 'order-delivery-date/order_delivery_date.php' ) &&
( false === $orddd_lite_activate_time || ( $orddd_lite_activate_time > 0 && $current_time >= $orddd_lite_sixty_days ) ) ) {
global $current_user ;
$user_id = $current_user->ID;
if ( ! get_user_meta( get_current_user_id(), 'orddd_pro_first_notice_ignore' ) ) {
$class = 'updated notice-info point-notice';
$style = 'position:relative';
$orddd_pro_link = 'https://www.tychesoftwares.com/store/premium-plugins/order-delivery-date-for-woocommerce-pro-21/checkout?edd_action=add_to_cart&download_id=16&utm_source=wpnotice&utm_medium=first&utm_campaign=OrderDeliveryDateLitePlugin';
$message = wp_kses_post ( __( 'Thank you for using Order Delivery Date for WooCommerce! Never login to your admin to check your deliveries by syncing the delivery dates to the Google Calendar from Order Delivery Date Pro for WooCommerce. <strong><a target="_blank" href= "'.$orddd_pro_link.'">Get it now!</a></strong>', 'order-delivery-date' ) );
$add_query_arguments = add_query_arg( 'orddd_pro_first_notice_ignore', '0' );
$cancel_button = '<a href="'.$add_query_arguments.'" class="dashicons dashicons-dismiss dashicons-dismiss-icon" style="position: absolute; top: 8px; right: 8px; color: #222; opacity: 0.4; text-decoration: none !important;"></a>';
printf( '<div class="%1$s" style="%2$s"><p>%3$s %4$s</p></div>', $class, $style, $message, $cancel_button );
}
if ( get_user_meta( get_current_user_id(), 'orddd_pro_first_notice_ignore' ) &&
! get_user_meta( get_current_user_id(), 'orddd_pro_second_notice_ignore' ) &&
! is_plugin_active( 'post-purchase-experience/post-purchase-experience.php' ) ) {
$orddd_first_ignore_time = get_user_meta( get_current_user_id(), 'orddd_pro_first_notice_ignore_time' );
$orddd_fifteen_days = strtotime( '+15 Days', $orddd_first_ignore_time[0] );
if ( $current_time > $orddd_fifteen_days ){
$class = 'updated notice-info point-notice';
$style = 'position:relative';
$post_purchase_link = 'https://www.tychesoftwares.com/store/premium-plugins/post-delivery-product-reviews-addon-order-delivery-date-woocommerce/checkout?edd_action=add_to_cart&download_id=278278&utm_source=wpnotice&utm_medium=second&utm_campaign=OrderDeliveryDateLitePlugin';
$message = wp_kses_post ( __( 'Send Product review emails to the customers on the next day of delivery using Post Delivery Product Reviews Addon for Order Delivery Date plugin. <strong><a target="_blank" href= "'.$post_purchase_link.'">Have it now!</a></strong>', 'order-delivery-date' ) );
$add_query_arguments = add_query_arg( 'orddd_pro_second_notice_ignore', '0' );
$cancel_button = '<a href="'.$add_query_arguments.'" class="dashicons dashicons-dismiss dashicons-dismiss-icon" style="position: absolute; top: 8px; right: 8px; color: #222; opacity: 0.4; text-decoration: none !important;"></a>';
printf( '<div class="%1$s" style="%2$s"><p>%3$s %4$s</p></div>', $class, $style, $message, $cancel_button );
}
}
if ( get_user_meta( get_current_user_id(), 'orddd_pro_first_notice_ignore' ) &&
! get_user_meta( get_current_user_id(), 'orddd_pro_third_notice_ignore' ) &&
is_plugin_active( 'post-purchase-experience/post-purchase-experience.php' ) &&
! is_plugin_active( 'woocommerce-abandon-cart-pro/woocommerce-ac.php' ) &&
! is_plugin_active( 'woocommerce-abandoned-cart/woocommerce-ac.php' ) ) {
$orddd_first_ignore_time = get_user_meta( get_current_user_id(), 'orddd_pro_first_notice_ignore_time' );
$orddd_fifteen_days = strtotime( '+15 Days', $orddd_first_ignore_time[0] );
if ( $current_time > $orddd_fifteen_days ){
$class = 'updated notice-info point-notice';
$style = 'position:relative';
$orddd_wcal_lite_link = admin_url( '/plugin-install.php?s=abandoned+cart+tyche+softwares&tab=search&type=term' );
$message = wp_kses_post ( __( 'Boost your sales by recovering the abandoned carts with our FREE Abandoned Cart for WooCommerce plugin. <strong><a target="_blank" href= "'.$orddd_wcal_lite_link.'">Install it now.</a></strong>', 'order-delivery-date' ) );
$add_query_arguments = add_query_arg( 'orddd_pro_third_notice_ignore', '0' );
$cancel_button = '<a href="'.$add_query_arguments.'" class="dashicons dashicons-dismiss dashicons-dismiss-icon" style="position: absolute; top: 8px; right: 8px; color: #222; opacity: 0.4; text-decoration: none !important;"></a>';
printf( '<div class="%1$s" style="%2$s"><p>%3$s %4$s</p></div>', $class, $style, $message, $cancel_button );
}
}
if ( get_user_meta( get_current_user_id(), 'orddd_pro_first_notice_ignore' ) &&
! get_user_meta( get_current_user_id(), 'orddd_pro_fourth_notice_ignore' ) &&
is_plugin_active( 'post-purchase-experience/post-purchase-experience.php' ) &&
( is_plugin_active( 'woocommerce-abandon-cart-pro/woocommerce-ac.php' ) ||
is_plugin_active( 'woocommerce-abandoned-cart/woocommerce-ac.php' ) ) ) {
$orddd_first_ignore_time = get_user_meta( get_current_user_id(), 'orddd_pro_first_notice_ignore_time' );
$orddd_fifteen_days = strtotime( '+15 Days', $orddd_first_ignore_time[0] );
if ( $current_time > $orddd_fifteen_days ){
$class = 'updated notice-info point-notice';
$style = 'position:relative';
$orddd_pro_link = 'https://www.tychesoftwares.com/store/premium-plugins/order-delivery-date-for-woocommerce-pro-21/checkout?edd_action=add_to_cart&download_id=16&utm_source=wpnotice&utm_medium=fourth&utm_campaign=OrderDeliveryDateLitePlugin';
$message = wp_kses_post ( __( 'Create Delivery Settings by Shipping Zones & Shipping Classes using Order Delivery Date Pro for WooCommerce plugin. <br>Use discount code "ORDPRO20" and grab 20% discount on the purchase of the plugin. The discount code is valid only for the first 20 customers. <strong><a target="_blank" href= "'.$orddd_pro_link.'">Purchase now</a></strong>.', 'order-delivery-date' ) );
$add_query_arguments = add_query_arg( 'orddd_pro_fourth_notice_ignore', '0' );
$cancel_button = '<a href="'.$add_query_arguments.'" class="dashicons dashicons-dismiss dashicons-dismiss-icon" style="position: absolute; top: 8px; right: 8px; color: #222; opacity: 0.4; text-decoration: none !important;"></a>';
printf( '<div class="%1$s" style="%2$s"><p>%3$s %4$s</p></div>', $class, $style, $message, $cancel_button );
}
}
if ( get_user_meta( get_current_user_id(), 'orddd_pro_first_notice_ignore' ) &&
get_user_meta( get_current_user_id(), 'orddd_pro_second_notice_ignore' ) &&
! get_user_meta( get_current_user_id(), 'orddd_pro_third_notice_ignore' ) &&
! is_plugin_active( 'woocommerce-abandon-cart-pro/woocommerce-ac.php' ) &&
! is_plugin_active( 'woocommerce-abandoned-cart/woocommerce-ac.php' ) ) {
$orddd_second_ignore_time = get_user_meta( get_current_user_id(), 'orddd_pro_second_notice_ignore_time' );
$orddd_seven_days = strtotime( '+7 Days', $orddd_second_ignore_time[0] );
if ( $current_time > $orddd_seven_days ){
$class = 'updated notice-info point-notice';
$style = 'position:relative';
$orddd_wcal_lite_link = admin_url( '/plugin-install.php?s=abandoned+cart+tyche+softwares&tab=search&type=term' );
$message = wp_kses_post ( __( 'Boost your sales by recovering the abandoned carts with our FREE Abandoned Cart for WooCommerce plugin. <strong><a target="_blank" href= "'.$orddd_wcal_lite_link.'">Install it now.</a></strong>.', 'order-delivery-date' ) );
$add_query_arguments = add_query_arg( 'orddd_pro_third_notice_ignore', '0' );
$cancel_button = '<a href="'.$add_query_arguments.'" class="dashicons dashicons-dismiss dashicons-dismiss-icon" style="position: absolute; top: 8px; right: 8px; color: #222; opacity: 0.4; text-decoration: none !important;"></a>';
printf( '<div class="%1$s" style="%2$s"><p>%3$s %4$s</p></div>', $class, $style, $message, $cancel_button );
}
}
if ( get_user_meta( get_current_user_id(), 'orddd_pro_first_notice_ignore' ) &&
get_user_meta( get_current_user_id(), 'orddd_pro_second_notice_ignore' ) &&
! get_user_meta( get_current_user_id(), 'orddd_pro_fourth_notice_ignore' ) &&
( is_plugin_active( 'woocommerce-abandon-cart-pro/woocommerce-ac.php' ) ||
is_plugin_active( 'woocommerce-abandoned-cart/woocommerce-ac.php' ) ) ) {
$orddd_second_ignore_time = get_user_meta( get_current_user_id(), 'orddd_pro_second_notice_ignore_time' );
$orddd_fifteen_days = strtotime( '+15 Days', $orddd_second_ignore_time[0] );
if ( $current_time > $orddd_fifteen_days ) {
$class = 'updated notice-info point-notice';
$style = 'position:relative';
$orddd_pro_link = 'https://www.tychesoftwares.com/store/premium-plugins/order-delivery-date-for-woocommerce-pro-21/checkout?edd_action=add_to_cart&download_id=16&utm_source=wpnotice&utm_medium=fourth&utm_campaign=OrderDeliveryDateLitePlugin';
$message = wp_kses_post ( __( 'Create Delivery Settings by Shipping Zones & Shipping Classes using Order Delivery Date Pro for WooCommerce plugin. <br>Use discount code "ORDPRO20" and grab 20% discount on the purchase of the plugin. The discount code is valid only for the first 20 customers. <strong><a target="_blank" href= "'.$orddd_pro_link.'">Purchase now</a></strong>.', 'order-delivery-date' ) );
$add_query_arguments = add_query_arg( 'orddd_pro_fourth_notice_ignore', '0' );
$cancel_button = '<a href="'.$add_query_arguments.'" class="dashicons dashicons-dismiss dashicons-dismiss-icon" style="position: absolute; top: 8px; right: 8px; color: #222; opacity: 0.4; text-decoration: none !important ;"></a>';
printf( '<div class="%1$s" style="%2$s"><p>%3$s %4$s</p></div>', $class, $style, $message, $cancel_button );
}
}
if ( get_user_meta( get_current_user_id(), 'orddd_pro_first_notice_ignore' ) &&
get_user_meta( get_current_user_id(), 'orddd_pro_second_notice_ignore' ) &&
get_user_meta( get_current_user_id(), 'orddd_pro_third_notice_ignore' ) &&
! get_user_meta( get_current_user_id(), 'orddd_pro_fourth_notice_ignore' ) ) {
$orddd_third_ignore_time = get_user_meta( get_current_user_id(), 'orddd_pro_third_notice_ignore_time' );
$orddd_seven_days = strtotime( '+7 Days', $orddd_third_ignore_time[0] );
if ( $current_time > $orddd_seven_days ) {
$class = 'updated notice-info point-notice';
$style = 'position:relative';
$orddd_pro_link = 'https://www.tychesoftwares.com/store/premium-plugins/order-delivery-date-for-woocommerce-pro-21/checkout?edd_action=add_to_cart&download_id=16&utm_source=wpnotice&utm_medium=fourth&utm_campaign=OrderDeliveryDateLitePlugin';
$message = wp_kses_post ( __( 'Create Delivery Settings by Shipping Zones & Shipping Classes using Order Delivery Date Pro for WooCommerce plugin. <br>Use discount code "ORDPRO20" and grab 20% discount on the purchase of the plugin. The discount code is valid only for the first 20 customers. <strong><a target="_blank" href= "'.$orddd_pro_link.'">Purchase now</a></strong>.', 'order-delivery-date' ) );
$add_query_arguments = add_query_arg( 'orddd_pro_fourth_notice_ignore', '0' );
$cancel_button = '<a href="'.$add_query_arguments.'" class="dashicons dashicons-dismiss dashicons-dismiss-icon" style="position: absolute; top: 8px; right: 8px; color: #222; opacity: 0.4; text-decoration: none !important ;"></a>';
printf( '<div class="%1$s" style="%2$s"><p>%3$s %4$s</p></div>', $class, $style, $message, $cancel_button );
}
}
if ( get_user_meta( get_current_user_id(), 'orddd_pro_first_notice_ignore' ) &&
get_user_meta( get_current_user_id(), 'orddd_pro_second_notice_ignore' ) &&
get_user_meta( get_current_user_id(), 'orddd_pro_third_notice_ignore' ) &&
get_user_meta( get_current_user_id(), 'orddd_pro_fourth_notice_ignore' ) &&
! get_user_meta( get_current_user_id(), 'orddd_pro_fifth_notice_ignore' ) &&
! is_plugin_active( 'post-purchase-experience/post-purchase-experience.php' ) ) {
$orddd_fourth_ignore_time = get_user_meta( get_current_user_id(), 'orddd_pro_fourth_notice_ignore_time' );
$orddd_seven_days = strtotime( '+7 Days', $orddd_fourth_ignore_time[0] );
if ( $current_time > $orddd_seven_days ){
$class = 'updated notice-info point-notice';
$style = 'position:relative';
$orddd_pro_link = 'https://www.tychesoftwares.com/store/premium-plugins/post-delivery-product-reviews-addon-order-delivery-date-woocommerce/checkout?edd_action=add_to_cart&download_id=278278&utm_source=wpnotice&utm_medium=fifth&utm_campaign=OrderDeliveryDateLitePlugin';
$message = wp_kses_post ( __( 'Receive feedbacks for your products from verified owners by sending them post delivery emails using Post Delivery Product Reviews addon of Order Delivery Date plugin. <strong><a target="_blank" href= "'.$orddd_pro_link.'">Have it now!</a></strong>', 'order-delivery-date' ) );
$add_query_arguments = add_query_arg( 'orddd_pro_fifth_notice_ignore', '0' );
$cancel_button = '<a href="'.$add_query_arguments.'" class="dashicons dashicons-dismiss dashicons-dismiss-icon" style="position: absolute; top: 8px; right: 8px; color: #222; opacity: 0.4; text-decoration: none !important;"></a>';
printf( '<div class="%1$s" style="%2$s"><p>%3$s %4$s</p></div>', $class, $style, $message, $cancel_button );
}
}
}
}
public static function orddd_lite_ignore_pro_notices() {
if ( isset( $_GET['orddd_pro_first_notice_ignore'] ) && '0' === $_GET['orddd_pro_first_notice_ignore'] ) {
add_user_meta( get_current_user_id(), 'orddd_pro_first_notice_ignore', 'true', true );
add_user_meta( get_current_user_id(), 'orddd_pro_first_notice_ignore_time', current_time( 'timestamp' ), true );
wp_safe_redirect( remove_query_arg( 'orddd_pro_first_notice_ignore' ) );
}
if ( isset( $_GET['orddd_pro_second_notice_ignore'] ) && '0' === $_GET['orddd_pro_second_notice_ignore'] ) {
add_user_meta( get_current_user_id(), 'orddd_pro_second_notice_ignore', 'true', true );
add_user_meta( get_current_user_id(), 'orddd_pro_second_notice_ignore_time', current_time( 'timestamp' ), true );
wp_safe_redirect( remove_query_arg( 'orddd_pro_second_notice_ignore' ) );
}
if ( isset( $_GET['orddd_pro_third_notice_ignore'] ) && '0' === $_GET['orddd_pro_third_notice_ignore'] ) {
add_user_meta( get_current_user_id(), 'orddd_pro_third_notice_ignore', 'true', true );
add_user_meta( get_current_user_id(), 'orddd_pro_third_notice_ignore_time', current_time( 'timestamp' ), true );
wp_safe_redirect( remove_query_arg( 'orddd_pro_third_notice_ignore' ) );
}
if ( isset( $_GET['orddd_pro_fourth_notice_ignore'] ) && '0' === $_GET['orddd_pro_fourth_notice_ignore'] ) {
add_user_meta( get_current_user_id(), 'orddd_pro_fourth_notice_ignore', 'true', true );
add_user_meta( get_current_user_id(), 'orddd_pro_fourth_notice_ignore_time', current_time( 'timestamp' ), true );
wp_safe_redirect( remove_query_arg( 'orddd_pro_fourth_notice_ignore' ) );
}
if ( isset( $_GET['orddd_pro_fifth_notice_ignore'] ) && '0' === $_GET['orddd_pro_fifth_notice_ignore'] ) {
add_user_meta( get_current_user_id(), 'orddd_pro_fifth_notice_ignore', 'true', true );
add_user_meta( get_current_user_id(), 'orddd_pro_fifth_notice_ignore_time', current_time( 'timestamp' ), true );
wp_safe_redirect( remove_query_arg( 'orddd_pro_fifth_notice_ignore' ) );
}
}
}
$orddd_lite_pro_notices = new orddd_lite_pro_notices();