Automattic\WooCommerce\Blocks\BlockTypes
AddToCartWithOptionsVariationSelector::render()
Render the block.
Метод класса: AddToCartWithOptionsVariationSelector{}
Хуков нет.
Возвращает
Строку
. Rendered block output.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->render( $attributes, $content, $block ): string;
- $attributes(массив) (обязательный)
- Block attributes.
- $content(строка) (обязательный)
- Block content.
- $block(WP_Block) (обязательный)
- Block instance.
Код AddToCartWithOptionsVariationSelector::render() AddToCartWithOptionsVariationSelector::render WC 9.8.5
protected function render( $attributes, $content, $block ): string { global $product; if ( $product instanceof \WC_Product && $product->is_type( 'variable' ) ) { return $this->render_variation_form( $product, $attributes ); } return ''; }