Example #1
0
 public static function handle_ajax_response()
 {
     if (!wp_verify_nonce($_POST['nonce'], 'wpbdp-set_site_tracking')) {
         exit;
     }
     if (isset($_POST['enable_tracking'])) {
         update_option('wpbdp-show-tracking-pointer', 0);
         if (intval($_POST['enable_tracking'])) {
             wpbdp_set_option('tracking-on', true);
         }
     }
 }
Example #2
0
 public function ajax_fees_set_order()
 {
     $nonce = isset($_POST['_wpnonce']) ? $_POST['_wpnonce'] : '';
     $order = isset($_POST['fee_order']) ? $_POST['fee_order'] : false;
     if (!wp_verify_nonce($nonce, 'change fees order') || !$order) {
         exit;
     }
     $res = new WPBDP_Ajax_Response();
     wpbdp_set_option('fee-order', $order);
     $res->send();
 }