Disable autosave for all order types w/ meta boxes

This commit is contained in:
thenbrent 2014-10-07 15:12:32 +10:00
parent 589da28f42
commit 6869403a39
1 changed files with 1 additions and 1 deletions

View File

@ -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' );
}
}