| 1 |
<?php |
| 2 |
|
| 3 |
use YayMail\License\License; |
| 4 |
|
| 5 |
defined( 'ABSPATH' ) || exit; |
| 6 |
|
| 7 |
$class = 'notice notice-error'; |
| 8 |
$renew_text = 'Please click here to renew your license key and continue receiving automatic updates.'; |
| 9 |
$licensing_plugins = $this->get_licensing_plugins(); |
| 10 |
foreach ( $licensing_plugins as $_plugin ) { |
| 11 |
$license = new License( $_plugin['slug'] ); |
| 12 |
if ( $license->is_expired() ) { |
| 13 |
$message = "Your license key for {$_plugin['name']} has expired."; |
| 14 |
?> |
| 15 |
<div class="<?php echo esc_attr( $class ); ?>"> |
| 16 |
<p> |
| 17 |
<?php echo esc_html( $message ); ?> |
| 18 |
<a href="<?php echo esc_url( $license->get_renewal_url() ); ?>" target="_blank"> |
| 19 |
<?php echo esc_html( $renew_text ); ?> |
| 20 |
</a> |
| 21 |
</p> |
| 22 |
</div> |
| 23 |
<?php |
| 24 |
} |
| 25 |
} |
| 26 |
|