diff --git a/High-Performance-Order-Storage-Upgrade-Recipe-Book.md b/High-Performance-Order-Storage-Upgrade-Recipe-Book.md index 8726814..00d0748 100644 --- a/High-Performance-Order-Storage-Upgrade-Recipe-Book.md +++ b/High-Performance-Order-Storage-Upgrade-Recipe-Book.md @@ -169,7 +169,7 @@ The following snippet shows a way to add meta boxes to the legacy order editor s ```php use Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController; -add_action( 'add_meta_boxes', 'xyz_metabox' ); +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() @@ -205,7 +205,7 @@ Once you examined the extension's code, you can declare whether it's compatible ```php add_action( 'before_woocommerce_init', function() { - if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { + if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); } } ); @@ -217,7 +217,7 @@ If you know your code doesn't support HPOS, you should declare **incompatibility ```php add_action( 'before_woocommerce_init', function() { - if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { + if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, false ); } } );