Fix spacing on code snippets

Beau Lebens 2022-10-12 19:31:41 -06:00
parent 7c03873d37
commit 6d7b7e302b
1 changed files with 6 additions and 6 deletions

@ -195,22 +195,22 @@ Once you examined the extension's code, you can declare whether it's compatible
```php ```php
add_action('before_woocommerce_init', function() { add_action( 'before_woocommerce_init', function() {
if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', 'my-plugin-name/my-plugin-name.php', true); \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', 'my-plugin-name/my-plugin-name.php', true );
} }
}); } );
``` ```
If you know your code doesn't support HPOS, you should declare **incompatibility** in the following way: If you know your code doesn't support HPOS, you should declare **incompatibility** in the following way:
```php ```php
add_action('before_woocommerce_init', function() { add_action( 'before_woocommerce_init', function() {
if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', 'my-plugin-name/my-plugin-name.php', false); \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', 'my-plugin-name/my-plugin-name.php', false );
} }
}); } );
``` ```