Ecommerce Shopify WordPress Discussion

admin_enqueue_scripts not load script

I'm creating a plugin to load my JS code on admin pages. In __construct in my class I use: add_action('admin_enqueue_scripts', array($this, 'zhngroup_enqueue_scripts')); And this is my zhngrupa_enqueue_scripts method: public function zhngrupa_enqueue_scripts() { // Get order iD $order_id = $this->order_id; // If the order ID is still 0, please complete the process if ($order_id === 0) { return; } wp_register_script( 'zhngrupa-script', '', array('jquery'), true, true ); // Add JavaScript directly in your PHP code wp_enqueue_script( 'zhngroup-script' ); // Pass data to JavaScript wp_localize_script('zhngroup-script', 'zhngroupScriptParams', array( 'nonce' => wp_create_nonce('zhngrupa_expired_service_nonce'), 'order_id' => $order_id, )); } Unfortunately in my code my JS file is not loaded. Strangely enough, on the test version of Wordpress, not the production version, my entire project works without any problems. Please help. I checked through an external plugin and my method is actually connected to the admin_enqueue_scripts hook I tried to debug the code, tested it on a local WordPress instance with the same version as in production. On the trial version, everything works without any problems. Unfortunately, no results. My JS code is not loading into the page at all. I checked it in the page code preview.
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.