File "render.php"
Full Path: /home/romayxjt/public_html/wp-content/plugins/orderable/inc/modules/receipt-layouts/blocks/order-total-items/build/render.php
File size: 568 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
/**
* Render Order Total Ttems block.
*
* @package orderable
*/
// phpcs:ignore WordPress.WP.GlobalVariablesOverride
$order = Orderable_Receipt_Layouts::get_order();
if ( ! $order ) {
return;
}
$label = $attributes['label'] ?? __( 'Total items: ', 'orderable' );
$items_count = $order->get_item_count();
?>
<div <?php echo wp_kses_data( Orderable_Receipt_Layouts::get_receipt_block_wrapper_attributes() ); ?>>
<?php printf( '<span class="wp-block-orderable-receipt-layouts__label">%s</span>%d', esc_html( $label ), absint( $items_count ) ); ?>
</div>