WordPress can not load scripts after init hook.
PluginBoilerplate is missing the correct handling process for those kind of usage.
This OOP WP Plugin Boilerplate do it much better, and provide loader classes for admin and client.
Related Posts:
- Get returned variable from a function to add_shortcode function
- Is it possible to modify the media library admin screen?
- Add tab to profile.php wordpress plugin development
- .mo translation strings not loading in PHP scripts that handle AJAX calls
- template_redirect or admin-ajax.php?
- Does admin_print_scripts-$hook_suffix work for nested paths to individual files?
- Remove an action by extending class and replacing it
- Best practice for plugin: always detect admin-ajax call?
- Ajax +wordpress onClick link redirect to new page and create html content
- Bad request 400 using class based files
- Add two button to page and post admin to redirect to : add new & list of (posts – pages) just after saving post or page
- Performing ajax request in wordpress
- OOP development and hooks
- Trigger a JavaScript function based on the data fetched from Woo commerce hook
- Difference Between Filter and Action Hooks?
- How many times will this code run? (or, how rich is grandma?)
- add_action hook for completely new post?
- How can I run AJAX on a button click event?
- WordPress Hook for user register
- Using filters and actions for plugin API?
- Using OOP plugin’s methods throughout the website
- Explanation of the “posts_join” and “posts_fields” filter hooks?
- Empty POST data on server on AJAX request using Angular $http
- wp_localize_script $handle
- How to check if certain plugin exists and in expected version
- Built in admin ajax hooks?
- Using Ajax call in jQuery doesn’t work in widget
- What function to hook for changes made in status and visibility of a post
- Order of Operation for these three hooks
- Modifying values with add_action to be sent to db
- save_post hook not triggered in WP v3.6.1
- Ajax in WordPress – path issue
- Get user id for delete and update selected user
- Hook to get image filename when it is uploaded
- WP AJAX is not working, always returns 0
- How to display a message about updates in the plugin list
- Act on user meta updated, but only once
- Admin auto-refresh is interfering with Firebug — how to prevent it?
- Execute Hook on the footer or header after activating a plugin
- WordPress not working on localhost
- Registering and using actions which return results in a Plugin class
- Slow WP_query due to nested wp_query. Need Suggestions
- how to add custom functionality after woocommerce place order button
- Conditional hook based on the core function that is calling it
- How can I rewrite a URL to pass requests to a custom method via AJAX? (I can’t use admin-ajax.php)
- Send push when new post is published in a certain category
- Storing data in wordpress database from ajax call from different website
- Create custom HTML/JS app inside page
- do_action() hook into load-(page)
- use of do_action() without any functions attached
- Use ‘get’ form action within a WordPress plugin admin page
- wp_localize_script is not adding a global variable for javascript
- Ajax is not working in a loop
- Using OOP inside a Plugin – Is it allowed?
- Odd map_meta_cap $args on post edit — sometimes integer, sometimes string
- Bind a function with its own argument to show something dynamically after every content
- A question about add_action()
- How to get error object returned by wp_create_user
- What’s the hook for filtering every texts of site?
- Hook add_attachment error
- Associate multiple email addresses with the same user account, so they can log in with either
- Update variable value via add_filter
- Custom filter not working
- hook update_option/updated_option empty $old_value and $value
- Issues Updating Post Meta with AJAX (Seems simple but cannot figure it out)
- ajax working when function is on child theme but not in plugin page
- Configure WordPress to Generate Scheme-less Relative URLs
- How to find list of all functions bind to a particular hook from my plugin?
- About a programming language starts with [closed]
- Workflow for new importer plugin – your advices?
- How to do admin ajax request in a plugin for rest api
- Ajax action has 200 status but response of No response data available for this request
- WordPress Does not grab the string sends useing AJAX response, wp_ajax hook
- Google Web Core Vitals – management, how to in wordpress and advice
- Plugin Development using classes – Public & Private Callbacks
- Trying to run a Ajax request from a checkout form in woocommerce via a custom plugin
- 400 Bad Request and illegal invocation in wp_ajax based on processData set to false or true
- Rate limiting ajax requests in WordPress
- ajax-action.php can’t find added action
- Problem in plugin debuging in wordpress
- WordPress Plugin Boilerplate – add actions and/or filters based on user’s role
- Error when activating a custom plugin on production server
- How to include files in the loop via ajax
- How to handle ajax Request in a complex-structured plugin?
- Add_action not calling callback function
- How to Maintain url on form submit
- PHP includes with AJAX actions
- how to retrieve post_id under woocommerce_add_to_cart_validation hook?
- WordPress function is not called and ajax return 0
- add_option_{$option} action hook not being called
- Function not working on any file other than the main plugin file
- Multi hook deploiement
- woocommerce single product page hook not working
- What happens when you create/edit a menu
- What is the use of wp_schedule_event hook?
- Page reload occurs before request finishes
- Method not receiving attributes from shortcode call, general OOP problems
- Insert plugin html content to a specific spot in the frontpage
- get_term_by() returning null on plugin
- wp_head is not fired from the hook I have used in my plugin