Automattic\WooCommerce\Admin\BlockTemplates
BlockInterface::add_disable_condition()
Add a disable condition to the block.
The disable condition is a JavaScript-like expression that will be evaluated on the client to determine if the block should be disabled. See @woocommerce/expression-evaluation for more details.
Method of the class: BlockInterface{}
No Hooks.
Return
String
. The key of the disable condition, which can be used to remove the disable condition.
Usage
$BlockInterface = new BlockInterface(); $BlockInterface->add_disable_condition( $expression ): string;
- $expression(string) (required)
- An expression, which if true, will disable the block.
BlockInterface::add_disable_condition() BlockInterface::add disable condition code WC 9.7.1
public function add_disable_condition( string $expression ): string;