Clicking custom plugin admin menu redirects to “No Update Required” on live site

I built a custom WordPress plugin that sends woocommerce purchase info to a CRM. The plugin works perfectly on localhost. But on live site, whenever I click on the admin menu, I always get redirected to "No Update Required" page.

enter image description here

Here is my main plugin file:

/**  * Plugin Name: Woo Crm  * Description: Sends customer data to the CRM on purchase.  */  if (!defined('ABSPATH')) {     echo 'I am a plugin I cannot do anything when called directly.';     exit; }  // Config define('PLUGIN_NAME', 'Woo Crm'); define('PLUGIN_SLUG', 'woo_crm'); define('PLUGIN_URL', plugin_dir_url(__FILE__)); define('PLUGIN_PATH', plugin_dir_path(__FILE__));  // Imports require_once(PLUGIN_PATH . 'utils/utils.php'); require_once(PLUGIN_PATH . 'views/views.php'); require_once(PLUGIN_PATH . 'services/crm/crm.php'); require_once(PLUGIN_PATH . 'views/components/settings/settings.php');  class WooCrm {     function __construct()     {         // Register Styles         add_action('admin_enqueue_scripts', array($  this, 'register_styles'));          // Create Menu Page         add_action('admin_menu', array($  this, 'plugin_setup_menu'));          // Add Settings Fields to Menu Page         add_action('admin_init', array('settings', 'init'));          // Woocommerce hook         /**          * First check if WooCommerce is activated          * Then check if hook isn't empty          */         if (class_exists('WooCommerce')) {             $  hook = get_when_to_send_data_hook();             if (!empty($  hook)) {                 add_action($  hook, array($  this, 'woo_order_create_client'));             }         }     }      function woo_order_create_client($  order_id)     {         // Create client logic     }      function plugin_setup_menu()     {         $  icon_url = PLUGIN_URL . "public/images/dash-icon.png";         add_menu_page(__(PLUGIN_NAME, PLUGIN_SLUG), __(PLUGIN_NAME, PLUGIN_SLUG), 'manage_options', PLUGIN_SLUG, array('views', 'admin'), $  icon_url);     }      function register_styles()     {         wp_register_style('woo_crm_admin', PLUGIN_URL . 'public/css/admin.css');         wp_enqueue_style('woo_crm_admin');     }  }  new WooCrm(); 

Any help would be highly appreciated.

[Hostpoco.com]★Christmas Offer★60% OFF & Lifetime 40% OFF★24×7 live support.

Hurry up!!!

This Christmas Hostpoco is going to offer a 60% flat discount and a 40% lifelong discount with web hosting plans. So if you are really planning to buy web hosting for your website, then there is no preferable time than now for your needs. We are sure that such offers come for few days in a year and you will have to wait almost for a year if you miss these offers.

Offer Start From:
================================================
Start Date: 18/12/2020 – End Date: 31/12/2020
================================================

You can take advantage of these deals using the below promo codes (for yearly+ billing cycles):
Coupon Code: XMAS60 60% Flat Discount for all shared, reseller, and WordPress hosting plans
Coupon Code: XMAS40 40% Lifetime off for all shared, reseller, and WordPress hosting plans

Promo Codes
Kindly copy and use the required offers coupon code at the time of checkout:

*WordPress Web Hosting: 60% One Time DiscountXMAS60
*Linux SSD Shared Web Hosting: 60% One Time DiscountXMAS60
*Linux HDD Shared Web Hosting: 60% One Time DiscountXMAS60
*High Resource Windows Hosting: 60% One Time DiscountXMAS60
*Linux HDD/SSD Shared/Reseller Web Hosting : 40% Lifetime Recurring DiscountXMAS40
*Windows Plesk Shared Web Hosting: 40% Recurring DiscountXMAS40
*100% Free Linux Shared Web Hosting: Direct Signup URL

All our web hosting plans come with the below key features :
– Instant Activation
– Multiple DC locations
– 30 days money-back guarantee
– Free Auto SSL
– Lets Encrypt SSL
– On-Demand SSH Access
– Free migration service
– Easy upgrades available
– Mail channels to route emails
– Max emails per hour
– 1GB memory supported
– Complete DDoS protection
– On-demand manual scan
– Antivirus available
– Single click script installer
– Perfect for WordPress, e-commerce, and heavy sites
– CPanel as control panel
– Free SEO Tools
– Max Email Accounts
– Unlimited Space for email accounts
– Unlimited FTP accounts
– Unconditional refund within 30 days
– 24×7 live chat support
– 24×7 support ticket service

USA, France, Netherlands web Hosting, Instant Activation, Fast Server, Fast support

BUY NOW:
https://hostpoco.com/web-hosting-offer-2021.php

For more Hosting plan details, please visit:https://hostpoco.com/

In case you have any questions, you can contact our sales department by initiating a chat or by dropping an email to Sales@hostpoco.com.

Change AJAX Live Post Search Loop into foreach

I was told that the reason for why the live post search does not work is because the loop needs changing into a foreach.

This is the code:

add_action( 'wp_ajax_data_fetch' , 'data_fetch' ); add_action( 'wp_ajax_nopriv_data_fetch', 'data_fetch' ); function data_fetch() {      global $  wpdb;     $  post_search_query = $  wpdb->get_results("SELECT * FROM wp_posts where post_type = 'post' and post_title like '%'".esc_attr( $  _POST['search_keyword'] )."'%'");          if( $  post_search_query->have_posts() ) :                  while( $  post_search_query->have_posts() ): $  post_search_query->the_post(); ?>                          <h5><a href="<?php echo esc_url( post_permalink() ); ?>"><?php the_title();?></a></h5>             <span class="live-search-product-excerpt"><?php the_excerpt(); ?></span>              <?php endwhile;         wp_reset_postdata();     endif;     die(); } 

The search is dead. It shows nothing. Can someone please help me with this as I am at a loss. Here is the rest of the code:

add_shortcode('live_search', 'live_search_shortcode'); function live_search_shortcode(){      $  live_search = '<input type="text" class="live-search" name="postSearch" id="postSearch" placeholder="Type to Live Search"></input>     <div id="datafetch"></div>';          return $  live_search; }  add_action('wp_footer', 'jquery_live_search_data_fetch'); function jquery_live_search_data_fetch() { ?>      <script type="text/javascript">                  (function($  ){              var searchRequest = null;                                  jQuery(function (){                                      var minlength = 3;                                  jQuery("#postSearch").keyup(function (){                                          var that = this,                                      value = jQuery(this).val();                                  if (value.length >= minlength){                                      if (searchRequest != null)                      searchRequest.abort();                                  searchRequest = jQuery.ajax({                                      type: "POST",                     url: "<?php echo admin_url('admin-ajax.php'); ?>",                 data: {                 action: 'data_fetch',                 search_keyword : value                 },                                  dataType: "html",                 success: function(data){                                          if (value==jQuery(that).val()) {                                              jQuery('#datafetch').html(data);                     }                 }             }         );     } else {      jQuery('#datafetch').html( '' );     }   } ); }); } (jQuery));     </script> <?php } 

FREE (yes. Just buy for $1 or PM me) Radio Generated from Live News Websites (from API)

How is it monetized?
Customers can only use the premium version by reading each of our emails. This site is monetized through email marketing.

Does this site come with any social media accounts?
No.

How much time does this site take to run?
Everything is automated after you run ads to it. This is to gain subscribers for automated email marketing campaigns.

What challenges are there with running this site?
The only challenge I see is running ads in the…

FREE (yes. Just buy for $ 1 or PM me) Radio Generated from Live News Websites (from API)

FREE (if you use ads to promote). All w/ Permission, Radio Generated from Live News Websites

How is it monetized?
Customers can only use the premium version by reading each of our emails. This site is monetized through email marketing.

Does this site come with any social media accounts?
No.

How much time does this site take to run?
Everything is automated after you run ads to it. This is to gain subscribers for automated email marketing campaigns.

What challenges are there with running this site?
The only challenge I see is running ads in the…

FREE (if you use ads to promote). All w/ Permission, Radio Generated from Live News Websites

Can’t add any menu items on live server (no item list)

I can’t add any items to menus on live server (can’t even see items to add list – there is list of dropdown "titles" like posts, pages, custom post types etc, but when I expand it – list is empty).

Locally it works. Another weird thing is that if I add items to menu locally and export whole wordpress installation with AIO WP Migration to live server, items are there, added to menu. But I still can’t add any other items (on the live server).

Any ideas what is going on? As I said, I have EXACTLY the same site on live server as I’m having locally (exported with AIO WP Migration), but still can’t add menu items on live server, while locally I can…

Can a raging barbarian carry live rabbits to kill them, in order to keep his rage going?

One of my players, a human barbarian, came up with the idea of carrying captured rabbits, feeding them and treating them nicely, so that he can rip them apart mid-battle if he knows he will be unable to attack during the round. Does this sound balanced or does this sound like breaking the rules?

How can live fire exercises be made safer?

My group is in Waterdeep, and our wizard would love to help train the world-famous griffon cavalry, especially in evading fireballs. That is, he wants to hurl fireballs at them that they need to evade.

I think this kind of live fire exercise is eminently worthwhile. (A nice spectacle for the populace, too.)

However, the griffons involved (and their riders) presumably would prefer some assurance they will not be singed too much.

How can we make this kind of live fire exercise safer for the targets?

  • One immediate possibility would be Protection from Energy, which confers resistance from one kind of energy, like fire. Prior to the exercise, someone could cast this spell at the griffon and rider. Unfortunately, even resistance only halves the damage involved, which can still be somewhat painful.
  • Enhance Ability (Cat’s Grace) would help with the Dexterity saving throws.
  • Something like the Rogue’s or the Monk’s Evasion ability would also be useful, but the griffons don’t have that. The Ring of Evasion requires attunement, and with the griffons’ Intelligence of 2, I don’t quite see how they would attune to the ring (on a claw?).

Multi-step, live updating search

I’m creating a website and want to set up a multi-step (live) filter for searching companies, industries etc and now I’m starting to explain…

I have 3 categories. First category has 5 criterias. When you choose one of them (it should be possible to choose ONLY one in the first stage) there are more criterias on the first sub-category and when you choose one criteria from the first sub-category (also should be possible to choose ONLY one) there comes the second sub-category where you can choose more criterias. It would be the best if you get the results LIVE. I’m searching for days and still can’t find anything. Hope it’s understandable and someone can help me. Thanks