Disable autosave for all order types w/ meta boxes
This commit is contained in:
parent
589da28f42
commit
6869403a39
|
@ -1701,7 +1701,7 @@ class WC_Admin_Post_Types {
|
|||
public function disable_autosave(){
|
||||
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' );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue