Skip to content

Instantly share code, notes, and snippets.

@lukecav
Created May 16, 2022 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukecav/61f02649db4d776cd4f42f6d8053e931 to your computer and use it in GitHub Desktop.
Save lukecav/61f02649db4d776cd4f42f6d8053e931 to your computer and use it in GitHub Desktop.
Enable custom order tables feature in WooCommerce (beta)
function enable_cot(){
$order_controller = wc_get_container()
->get('Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController');
if( isset( $order_controller ) ) {
$order_controller->show_feature();
}
}
add_action( 'init', 'enable_cot', 99 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment