Title: Use proper action to include admin scripts
Last modified: January 14, 2022

---

# Use proper action to include admin scripts

 *  Resolved [simbot](https://wordpress.org/support/users/simbot/)
 * (@simbot)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/use-proper-action-to-include-admin-scripts/)
 * You should really use admin_enqueue_scripts -> wp_enqueue_script to load admin
   scripts.
    Your actual implementation is broken.
 * Also you need to include select2 as dependency so it will load in the correct
   order.
 * `Uncaught TypeError: jQuery(...).select2 is not a function`
 * Simone B.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Omar AlDabbas](https://wordpress.org/support/users/omardabbas/)
 * (@omardabbas)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/use-proper-action-to-include-admin-scripts/#post-15568027)
 * Thanks Simbot,
    I’ve just released a new version 1.7 where this issue is addressed,
   please download and confirm. Omar

Viewing 1 replies (of 1 total)

The topic ‘Use proper action to include admin scripts’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/payment-gateways-per-product-categories-
   for-woocommerce_c1eef7.svg)
 * [Payment Methods by Product & Country for WooCommerce](https://wordpress.org/plugins/payment-gateways-per-product-categories-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/payment-gateways-per-product-categories-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/payment-gateways-per-product-categories-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/payment-gateways-per-product-categories-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/payment-gateways-per-product-categories-for-woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Omar AlDabbas](https://wordpress.org/support/users/omardabbas/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/use-proper-action-to-include-admin-scripts/#post-15568027)
 * Status: resolved