WC_Admin_Post_Types::disable_autosave()publicWC 1.0

Disable the auto-save functionality for Orders.

{} It's a method of the class: WC_Admin_Post_Types{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Admin_Post_Types = new WC_Admin_Post_Types();
$WC_Admin_Post_Types->disable_autosave();

Code of WC_Admin_Post_Types::disable_autosave() WC 6.7.0

public function disable_autosave() {
	global $post;

	if ( $post && in_array( get_post_type( $post->ID ), wc_get_order_types( 'order-meta-boxes' ), true ) ) {
		wp_dequeue_script( 'autosave' );
	}
}