WC_Admin_Post_Types::disable_autosave()publicWC 1.0

Disable the auto-save functionality for Orders.

Method of the class: WC_Admin_Post_Types{}

No Hooks.

Return

null. Nothing (null).

Usage

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

WC_Admin_Post_Types::disable_autosave() code WC 8.7.0

public function disable_autosave() {
	global $post;

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