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