no autosave for orders

This commit is contained in:
Mike Jolley 2012-02-26 01:05:42 +00:00
parent 38cac1324d
commit 74f2e5966d
1 changed files with 13 additions and 0 deletions

View File

@ -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
**/