Fix spacing on code snippets
parent
7c03873d37
commit
6d7b7e302b
|
@ -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 );
|
||||||
}
|
}
|
||||||
});
|
} );
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue