My scripts won’t load in, is this code correct?

The following functions print enqueued assets: wp_print_head_scripts() wp_print_styles() print_late_styles() print_footer_scripts() These functions are called on the wp_head and wp_footer actions. If your header and footer are not using the appropriate functions or actions, then the enqueued assets will not be printed.

How can I specifically enqueue scripts for edit orders pages only

You can do it by checking current post_type. For woocommerce order page, post type is shop_order. So try to change your code as follows. function selectively_enqueue_admin_script_js_for_edit_address($hook) { global $post; if ($post->post_type === ‘shop_order’) { if ($hook === ‘post.php’ || $hook === ‘post-new.php’) { wp_enqueue_script(‘artio-wc-admin-order-page-mod’, ‘/wp-content/plugins/custom_wc_mods/order_page/paste_payment_instructions_and_prompts_into_shipping_address_form_v2.js’, array(), date(“h:i:s”)); /* https://stackoverflow.com/a/31834007 */ /* During development, you could … Read more

How to give path to files in plugins folder?

I’d create a function and then use the wp_enqueue_scripts action to add your script to the list; function load_more_scripts() { wp_enqueue_script( ‘tsw-tools-js’, // unique handle name ‘/wp-content/plugins/dl-grid-addons/includes/wp-bakery/tsw/tsw-tools/assets/js/tsw-tools.js’ // path relative to WordPress root directory ); } add_action(‘wp_enqueue_scripts’, ‘load_more_scripts’); More information can be found here: https://developer.wordpress.org/reference/functions/wp_enqueue_script/

comment-reply.js is not loading

Maybe this helps you out? Please make a backup from functions.php and add following function. /** * Add .js script if “Enable threaded comments” is activated in Admin * Codex: {@link https://developer.wordpress.org/reference/functions/wp_enqueue_script/} */ function wpse218049_enqueue_comments_reply() { if( is_singular() && comments_open() && ( get_option( ‘thread_comments’ ) == 1) ) { // Load comment-reply.js (into footer) wp_enqueue_script( … Read more

tech