File "render.php"

Full Path: /home/romayxjt/public_html/wp-content/plugins/orderable/inc/modules/receipt-layouts/blocks/order-location/build/render.php
File size: 685 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
/**
 * Render Order Location block.
 *
 * @package orderable
 */

// phpcs:ignore WordPress.WP.GlobalVariablesOverride
$order = Orderable_Receipt_Layouts::get_order();

if ( ! $order ) {
	return;
}

$location_name = $order->get_meta( '_orderable_location_name' );
$location_name = empty( $location_name ) ? __( 'Main Location', 'orderable' ) : $location_name;

$label = $attributes['label'] ?? __( 'Location:', 'orderable' );
?>

<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>%s', esc_html( $label ), esc_html( $location_name ) ); ?>
</div>