Automattic\WooCommerce\Blocks\BlockTypes
ClassicShortcode::render_checkout
Render method for rendering the checkout shortcode.
Метод класса: ClassicShortcode{}
Хуков нет.
Возвращает
string. Rendered block type output.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->render_checkout( $attributes );
- $attributes(массив) (обязательный)
- Block attributes.
Код ClassicShortcode::render_checkout() ClassicShortcode::render checkout WC 11.1.0
protected function render_checkout( $attributes ) {
if ( ! isset( WC()->cart ) ) {
return '';
}
ob_start();
echo '<div class="' . esc_attr( $this->get_container_classes( $attributes ) ) . '">';
WC_Shortcode_Checkout::output( array() );
echo '</div>';
return ob_get_clean();
}