Automattic\WooCommerce\Blocks\BlockTypes\OrderConfirmation
BillingWrapper::render_content
This renders the content of the billing wrapper.
Метод класса: BillingWrapper{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// 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.
По умолчанию: ''
Код BillingWrapper::render_content() BillingWrapper::render content WC 10.4.0
protected function render_content( $order, $permission = false, $attributes = [], $content = '' ) {
if ( ! $order || ! $order->has_billing_address() || ! $permission ) {
return '';
}
return $content;
}