no autosave for orders
This commit is contained in:
parent
38cac1324d
commit
74f2e5966d
|
@ -7,6 +7,19 @@
|
|||
* @package WooCommerce
|
||||
*/
|
||||
|
||||
/**
|
||||
* Disable auto-save
|
||||
**/
|
||||
add_action('admin_print_scripts', 'woocommerce_disable_autosave_for_orders');
|
||||
|
||||
function woocommerce_disable_autosave_for_orders(){
|
||||
global $post;
|
||||
|
||||
if($post && get_post_type($post->ID) === 'shop_order'){
|
||||
wp_dequeue_script('autosave');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Columns for order page
|
||||
**/
|
||||
|
|
Loading…
Reference in New Issue