Merge pull request #6473 from thenbrent/disable_autosave_all_order_metaboxes

Disable autosave for all Edit Order screens
This commit is contained in:
Mike Jolley 2014-10-07 10:12:06 +01:00
commit 8d965ad22a
1 changed files with 4 additions and 4 deletions

View File

@ -1699,11 +1699,11 @@ class WC_Admin_Post_Types {
* @return void
*/
public function disable_autosave(){
global $post;
global $post;
if ( $post && get_post_type( $post->ID ) === 'shop_order' ) {
wp_dequeue_script( 'autosave' );
}
if ( $post && in_array( get_post_type( $post->ID ), wc_get_order_types( 'order-meta-boxes' ) ) ) {
wp_dequeue_script( 'autosave' );
}
}
/**