Automattic\WooCommerce\Blocks\BlockTypes\OrderConfirmation
AdditionalInformation::render_content
This renders the content of the block within the wrapper.
Метод класса: AdditionalInformation{}
Хуков нет.
Возвращает
Строку.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->render_content( $order, $permission, $attributes, $content );
- $order(WC_Order) (обязательный)
- Order object.
- $permission(строка|false)
- If the current user can view the order details or not.
По умолчанию: false - $attributes(массив)
- Block attributes.
По умолчанию: [] - $content(строка)
- Original block content.
По умолчанию: ''
Код AdditionalInformation::render_content() AdditionalInformation::render content WC 10.4.0
protected function render_content( $order, $permission = false, $attributes = [], $content = '' ) {
if ( ! $permission ) {
return $content;
}
$this->remove_core_hooks();
$content .= $this->get_hook_content( 'woocommerce_thankyou_' . $order->get_payment_method(), [ $order->get_id() ] );
$content .= $this->get_hook_content( 'woocommerce_thankyou', [ $order->get_id() ] );
$this->restore_core_hooks();
return $content;
}