Created
August 8, 2022 05:59
-
-
Save adrianduffell/57c1e2ad97c7cb120dbacba02e4f5d77 to your computer and use it in GitHub Desktop.
WooCommerce Enable COT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: WooCommerce Enable COT | |
* Description: Adds the code to enable Custom Order Tables. | |
* Version: 0.0.1 | |
*/ | |
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
This should no longer be used as it results in the warning: