Automattic\WooCommerce\Admin\BlockTemplates

BlockInterface::add_disable_condition()publicWC 1.0

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.

Метод класса: BlockInterface{}

Хуков нет.

Возвращает

Строку. The key of the disable condition, which can be used to remove the disable condition.

Использование

$BlockInterface = new BlockInterface();
$BlockInterface->add_disable_condition( $expression ): string;
$expression(строка) (обязательный)
An expression, which if true, will disable the block.

Код BlockInterface::add_disable_condition() WC 9.4.2

public function add_disable_condition( string $expression ): string;