Automattic\WooCommerce\Blocks\BlockTypes\OrderConfirmation
Status::render()
This block uses a custom render method so that the email verification form can be appended to the block. This does not inherit styles from the parent block.
Method of the class: Status{}
No Hooks.
Returns
String
. | void Rendered block output.
Usage
// protected - for code of main (parent) or child class $result = $this->render( $attributes, $content, $block );
- $attributes(array) (required)
- Block attributes.
- $content(string) (required)
- Block content.
- $block(WP_Block) (required)
- Block instance.
Status::render() Status::render code WC 9.8.5
protected function render( $attributes, $content, $block ) { $order = $this->get_order(); $classname = StyleAttributesUtils::get_classes_by_attributes( $attributes, array( 'extra_classes' ) ); if ( isset( $attributes['align'] ) ) { $classname .= " align{$attributes['align']}"; } $block = parent::render( $attributes, $content, $block ); if ( ! $block ) { return ''; } $additional_content = $this->render_confirmation_notice( $order ); if ( $additional_content ) { $block = $block . sprintf( '<div class="wc-block-order-confirmation-status-description %1$s">%2$s</div>', esc_attr( trim( $classname ) ), $additional_content ); } return $block; }