# storeengine/2.2.0/includes/shortcode/order-shipping-address.php

StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates &amp; More, version 2.2.0. 65 lines.

- Page: https://pluginprobe.com/plugins/storeengine/2.2.0/code/includes/shortcode/order-shipping-address.php
- Raw: https://pluginprobe.com/plugins/storeengine/2.2.0/raw/includes/shortcode/order-shipping-address.php
- Modified: 2026-07-30T16:04:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/storeengine/2.2.0/code/includes/shortcode/order-shipping-address.php#L10-L20`.

```php
<?php

namespace StoreEngine\Shortcode;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

use StoreEngine\Classes\Order;
use StoreEngine\Utils\Formatting;
use StoreEngine\Utils\Helper;
use StoreEngine\Utils\Template;
use WP_Error;

class OrderShippingAddress {

	public function __construct() {
		add_shortcode( 'storeengine_order_shipping_address', [ $this, 'render' ] );
	}

	public function render( $atts ) {
		$attributes  = shortcode_atts( [ 'dummy' => false ], $atts );
		$dummy_order = Formatting::string_to_bool( $attributes['dummy'] );

		if ( ! $dummy_order ) {
			// phpcs:ignore WordPress.Security.NonceVerification.Recommended
			$order_hash = isset( $_GET['order_hash'] ) ? sanitize_text_field( wp_unslash( $_GET['order_hash'] ) ) : '';
			$order      = Helper::get_order_by_key( $order_hash );
			$order      = $order instanceof WP_Error ? false : $order;

			if ( ! $order ) {
				// No order context at all — fall back to sample content so the
				// page isn't blank (direct view, preview, or editor render).
				$dummy_order = true;
			} elseif ( ! $order->has_shipping_address() || $order->get_auto_complete_digital_order() ) {
				// A real order that legitimately has no shipping address (e.g. a
				// digital order) should still render nothing.
				return '';
			}
		}

		if ( $dummy_order ) {
			$order = new Order();
			$order->set_shipping_first_name( 'John' );
			$order->set_shipping_last_name( 'Doe' );
			$order->set_shipping_address_1( 'Chuadanga Bus Stand, Abdur Razzak Complex' );
			$order->set_shipping_address_2( '4th Floor' );
			$order->set_shipping_city( 'Khulna' );
			$order->set_shipping_state( 'Jhenaidah' );
			$order->set_shipping_country( 'BD' );
			$order->set_shipping_email( 'support@storeengine.pro' );
			$order->set_shipping_phone( '01234567890123' );
			$order->set_shipping_company( 'Kodezen' );
			$order->set_shipping_postcode( '7300' );
		}

		ob_start();
		Template::get_template( 'shortcode/order-shipping-address.php', [
			'order' => $order,
		] );

		return ob_get_clean();
	}
}

```
