Merge pull request #6473 from thenbrent/disable_autosave_all_order_metaboxes
Disable autosave for all Edit Order screens
This commit is contained in:
commit
8d965ad22a
|
@ -1699,11 +1699,11 @@ class WC_Admin_Post_Types {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function disable_autosave(){
|
public function disable_autosave(){
|
||||||
global $post;
|
global $post;
|
||||||
|
|
||||||
if ( $post && get_post_type( $post->ID ) === 'shop_order' ) {
|
if ( $post && in_array( get_post_type( $post->ID ), wc_get_order_types( 'order-meta-boxes' ) ) ) {
|
||||||
wp_dequeue_script( 'autosave' );
|
wp_dequeue_script( 'autosave' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue