get_license_expires( $options_slug );
$expired = false;
$expired_error = __( 'Your license expired.', 'advanced-ads' );
ob_start();
?>
renew your license.', 'advanced-ads' ),
esc_url( ADVADS_URL ) . 'checkout/?edd_license_key=' . esc_attr( $license_key_for_expired_link ) . '#utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-licenses',
$update_button
);
if ( 'lifetime' !== $expires ) {
$expires_time = strtotime( $expires );
$days_left = ( $expires_time - time() ) / DAY_IN_SECONDS;
}
// phpcs:ignore
if ( 'lifetime' === $expires ) {
// do nothing.
} elseif ( $expired && $days_left <= 0 ) {
$plugin_url = isset( $plugin_url ) ? $plugin_url : ADVADS_URL;
$errortext = $expired_error;
$expired = true;
} elseif ( 0 < $days_left && 31 > $days_left ) {
$errortext = sprintf(
// translators: %d is a number of days.
esc_html__( '(%d days left)', 'advanced-ads' ),
$days_left
);
}
$show_active = ( false !== $license_status && 'valid' === $license_status && ! $expired ) ? true : false;
?>
readonly="readonly"/>
>
>