(DAY_IN_SECONDS * self::EXPIRED_LICENCE_NOTICE_DISMISS_FOR_DAYS)) { self::showExpired(); } } elseif ($license_status !== License::STATUS_VALID) { $global = \DUP_PRO_Global_Entity::get_instance(); if ($global->license_no_activations_left) { self::showNoActivationsLeft(); } else { $days_invalid = floor((time() - $global->initial_activation_timestamp) / 86400); // If an md5 is present always do standard nag $license_key = get_option(License::LICENSE_KEY_OPTION_NAME, ''); $md5_present = \DUP_PRO_Low_U::isValidMD5($license_key); if ($md5_present || ($days_invalid < License::UNLICENSED_SUPER_NAG_DELAY_IN_DAYS)) { self::showInvalidStandardNag(); } else { self::showInvalidSuperNag($days_invalid); } } } } } } /** * Shows the smaller standard nag screen * * @return string HTML alert message hook */ private static function showInvalidStandardNag() { $img_url = plugins_url('duplicator-pro/assets/img/warning.png'); $licensing_tab_url = self_admin_url() . "admin.php?page=" . \DUP_PRO_Constants::$SETTINGS_SUBMENU_SLUG . '&tab=licensing'; $problem_text = 'missing'; if (get_option(License::LICENSE_KEY_OPTION_NAME, '') !== '') { $problem_text = 'invalid or disabled'; } echo "

" . "Warning! Your Duplicator Pro license is {$problem_text}...
" . "This means this plugin doesn't have access to security updates, bug fixes, support request or new features.
" . "Please Activate Your License -or- go to snapcreek.com to get a license.

"; } /** * Shows the larger super nag screen used for display after the trial period * * @param int $daysInvalid The number of days the license has been invalid * * @return string HTML alert message hook */ private static function showInvalidSuperNag($daysInvalid) { $licensing_tab_url = esc_url(self_admin_url() . "admin.php?page=" . \DUP_PRO_Constants::$SETTINGS_SUBMENU_SLUG . '&tab=licensing'); ?>

Invalid

The Bad News: Your Duplicator Pro License is Invalid.
The Good News: You Can Get 10% Off Duplicator Pro Today!

The Duplicator Pro plugin has been running for at least 30 days without a valid license.
...which means you don't have access to security updates, bug fixes, support requests or new features.

Activate Your License Now...
- OR -
Purchase and Get 10% Off!*

*Discount appears in cart at checkout time.

' . '
' . "" . '
' . '

' . 'Duplicator Pro\'s license is deactivated because you\'re out of site activations.

' . "

Upgrade your license using the Snap Creek Dashboard or deactivate plugin on old sites.
" . "After making necessary changes refresh the license status." . ''; } /** * Shows the expired message alert * * @return string HTML alert message hook */ private static function showExpired() { $license_key = get_option(License::LICENSE_KEY_OPTION_NAME, ''); $renewal_url = 'https://snapcreek.com/checkout?edd_license_key=' . $license_key; $img_url = plugins_url('duplicator-pro/assets/img/plug.png'); $htmlMsg = "" . "Warning! Your Duplicator Pro license has expired...
" . "You're currently missing important updates for security patches, bug fixes, support requests, & new features.
" . "Renew now to receive a 40% discount off the current price!"; \DUP_PRO_UI_Notice::displayGeneralAdminNotice( $htmlMsg, \DUP_PRO_UI_Notice::GEN_ERROR_NOTICE, true, array( 'duplicator-pro-admin-notice', 'dpro-admin-notice' ), array( 'data-to-dismiss' => self::OPTION_KEY_EXPIRED_LICENCE_NOTICE_DISMISS_TIME ) ); } }