The previous answer works good with my example above using this hook:
add_action( 'admin_head', 'woocommerce_admin_init' );
function woocommerce_admin_init() {
$screen = get_current_screen();
if ( $screen->post_type == "shop_order" ) {
?>
<script type="text/javascript">
jQuery(document).ready(function ($) {
$(".edit_address").click();
$(".add-line-item").click();
});
</script>
<?php
}
}
Related Posts:
- How to Use JSON With AJAX?
- Admin wp_ajax hook returning 0
- Edit single attachment on click (WP-admin)
- Adding a character counter to the excerpt metabox
- WP Admin missing icons, numerous JavaScript errors, but only when SCRIPT_DEBUG is false
- Returning content via jQuery without footers on admin pages
- Can’t load a class into WordPress post editor’s content field
- Unable to uncheck checkbox with jquery in wp admin
- Hide metabox dependant on page template chosen
- jQuery is missing in wp-admin
- Bypass nonce value while trashing a post
- wp_dequeue_script not working in my plugin
- How to isolate code to the post edit screen
- Admin side jquery is not loaded
- Using Foundation 5 in WordPress Administration Area
- Notice-Updated div moving around unprompted
- Adding JavaScript file in Admin Panel
- Is there a default way in wordpress to create a overlay in the dashboard?
- Screen Options JavaScript Code
- Dashboard controls have all stopped working
- Is not using admin-ajax to ajax submissions okay?
- Uncaught TypeError: undefined is not a function (shortcode-box)
- Customize wp-admin form custom fields
- JQuery multiple toggle values
- jQuery .change() Event Bubbling in WP Admin
- Hook with jquery script is not working in wp-admin [closed]
- jQuery datepicker not showing on admin menu
- Override default options in plugin metaboxes
- How to send multiple data fields via Ajax?
- Adding an onclick function to go to url in JavaScript?
- Checking a Url in Jquery/Javascript
- Download File Using jQuery
- Jquery Ajax Posting JSON to webservice
- How can I display a tooltip message on hover using jQuery?
- correct way of comparing string jquery operator =
- Split string in jquery
- Javascript : array.length returns undefined
- Comparing dates in jquery
- jQuery: using a variable as a selector [duplicate]
- Slide right to left?
- jQuery – checkbox enable/disable
- Correct Method to run scripts with dependencies without enqueue?
- How to prevent wordpress from loading old versions of jquery in wp_head();?
- How to get a jQuery script to run on a page?
- Moving jQuery to the footer without using de-register in WordPress
- Best approach for loading a sidebar Only if the screen max-width is >900px?
- Localize variable for multiple Shortcodes
- Prevent five different copies of jquery from being included on every page
- javascript is not working on Event Submission?
- WordPress audio player causing js error, mediaelementplayer is not a function
- How to get a value from PHP in Jquery through Ajax
- Script for initializing JQuery Masonry for WordPress
- Combining media queries with image sizes
- Correct way to write jQuery functions in WordPress
- AJAX Loaded Glossary like Search results with links to other entries from custom table
- Trouble with WordPress Ajax Login System – 302
- Why does javascript works only if logged in?
- Load the next posts ajax
- How does WordPress handle HTML Tables interaction with jQuery
- Delete some text and change html tag with Jquery
- I am trying to modify a plugin and am adding Jquery, but it does not seem to be executing
- FacetWP – conditionally display facet labels
- Callback After WordPress Customizer Complete Loading
- Uncaught ReferenceError: jQuery is not defined . How do I define it correctly?
- Close Fancybox, sumbit form data and redirect
- jQuery tabs plugin with callback to fetch data
- jQuery is not defined [closed]
- Nested Gallery Shortcode INTERMITTENTLY working
- Best way of getting a a series of custom fields into an array?
- jQuery(selector) vs. $(selector)
- Null/undefined return in WordPress AJAX request
- Disable auto hide of the login form on Woocommerce’s checkout page
- How do I make Contact Form 7 pop up in thickbox? [closed]
- jQuery .load and WP function
- Determine image height within Fancybox
- WordPress AJAX Request returns 400
- How can I get this menu container to be the height of the contents?
- JQuery is not working after complete load of the page
- Carousel Slider For Custom PHP Snippet Is Not Working
- why does so many javascript libraries are loaded along with my website?
- Why does my media selection script write to ONLY the first input field?
- Modify the href attribute of tag dynamically in WordPress
- Add a jQuery snippet for sepcific user role
- Move jQuery on *top* of footer
- Call admin ajax using absolute url? Relative URL breaks (frontend ajax)
- Responsive framework – edit child js
- Page keeps refreshing with Ajax form
- jquery issue in functions.php
- JS plugin script loading but not working
- WP Calendar Shortcode not working on my theme
- Are you sure popup on Contact Form 7 [closed]
- change the icon of a custom post type in WordPress to use twitter boostrap
- Using jQuery toggle() in WordPress post to show/hide Tweet button?
- Call a Simple JQuery from within Flash
- Ajax request with jQuery without WP_ajax
- JS file not loading [closed]
- How can insert JQuery in WordPress? [closed]
- I need a Pop up with description when i click an image
- Jquery in IE, fully messed up
- Enqueued jQuery not working