Skip to content

Commit

Permalink
Merge pull request #2 from NewPath-Consulting/fix-deactivation
Browse files Browse the repository at this point in the history
Fix deactivation when WAP is deactivated
  • Loading branch information
asirota authored Aug 2, 2022
2 parents d319837 + 4837369 commit 898904e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wawp-addon-wa-iframe.php → wap-addon-wa-iframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
*/


const WAWP_IFRAME_SLUG = 'wawp-addon-iframe';
const WAWP_IFRAME_SLUG = 'wap-addon-iframe';
const WAWP_IFRAME_SHOW_NOTICE_ACTIVATION = 'show_notice_activation_' . WAWP_IFRAME_SLUG;
const WAWP_IFRAME_LICENSE_CHECK = 'license-check-' . WAWP_IFRAME_SLUG;
const WAWP_IFRAME_NAME = 'Wild Apricot iFrame Add-on for WAP';

add_action( 'init', 'create_block_wawp_addon_wa_iframe_block_init' );
function create_block_wawp_addon_wa_iframe_block_init() {
if (!class_exists('WAWP\Addon')) {
wawp_iframe_not_loaded_die();
add_action('admin_init', 'wawp_iframe_not_loaded_die');
return;
}
$license_valid = WAWP\Addon::instance()::has_valid_license(WAWP_IFRAME_SLUG);
Expand All @@ -43,7 +43,7 @@ function create_block_wawp_addon_wa_iframe_block_init() {
* Error message for if WAWP is not installed or activated.
*/
function wawp_iframe_not_loaded_notice_msg() {
echo "<div class='error'><p><strong>";
echo "<div class='notice notice-error'><p><strong>";
echo WAWP_IFRAME_NAME . '</strong> requires that Wild Apricot for Wordpress is installed and activated.</p></div>';
unset($_GET['activate']);
return;
Expand Down Expand Up @@ -79,7 +79,7 @@ function wawp_iframe_not_loaded_die() {
register_activation_hook(plugin_basename(__FILE__), 'wawp_iframe_activate');
function wawp_iframe_activate() {
if (!class_exists('WAWP\Addon')) {
wawp_not_loaded_die();
add_action('admin_init', 'wawp_iframe_not_loaded_die');
return;
}

Expand Down

0 comments on commit 898904e

Please sign in to comment.