= $future_popup_date && $avoid_notice == 1) { ?>

'We\'ve noted your response, Thank you for your efforts.')); } else { wp_send_json_error(array('message' => 'Something went wrong!')); } } else { wp_send_json_error(array('message' => 'Something went wrong!')); } } public function update_display_notice_option() { /* it's an Ajax call */ if (defined('DOING_AJAX') && DOING_AJAX) { $rating_positive = update_option('lc_rating_notice', 1); if ($rating_positive == 1) { wp_send_json_success(array('message' => 'Thank You!')); } else { wp_send_json_error(array('message' => 'Something went wrong!')); } } else { wp_send_json_error(array('message' => 'Something went wrong!')); } } /** * Adding Hooks * * @package Loan Calculator * @since 1.0.0 */ public function add_hooks() { add_action('admin_menu', array($this, 'ww_loan_calculator_admin_menu')); add_action('admin_init', array($this, 'loan_calculator_settings')); add_action('admin_notices', array($this, 'loan_calculator_wp_admin_notice')); add_action('wp_ajax_plugin_notice_review_yes', array($this, 'update_display_notice_option')); add_action('wp_ajax_avoid_admin_notice', array($this, 'update_user_choice_weekly')); } } }