diff --git a/High-Performance-Order-Storage-Upgrade-Recipe-Book.md b/High-Performance-Order-Storage-Upgrade-Recipe-Book.md index 2dd652f..a5931d5 100644 --- a/High-Performance-Order-Storage-Upgrade-Recipe-Book.md +++ b/High-Performance-Order-Storage-Upgrade-Recipe-Book.md @@ -172,7 +172,7 @@ use Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableControlle add_action( 'add_meta_boxes', 'add_xyz_metabox' ); function add_xyz_metabox() { - $screen = wc_get_container()->get( CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled() + $screen = class_exists( '\Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController' ) && wc_get_container()->get( CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled() ? wc_get_page_screen_id( 'shop-order' ) : 'shop_order';