WC_Admin_Post_Types::disable_autosave()
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() WC Admin Post Types::disable autosave code WC 9.7.1
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' ); } }