Automattic\WooCommerce\Blocks\BlockTypes
ClassicShortcode::render_checkout()
Render method for rendering the checkout shortcode.
Method of the class: ClassicShortcode{}
No Hooks.
Return
String
. Rendered block type output.
Usage
// protected - for code of main (parent) or child class $result = $this->render_checkout( $attributes );
- $attributes(array) (required)
- Block attributes.
ClassicShortcode::render_checkout() ClassicShortcode::render checkout code WC 9.4.2
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(); }