WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Shortcode_Checkout::order_received() private WC 1.0

Show the thanks page.

Это метод класса: WC_Shortcode_Checkout{}

Возвращает

Null. Ничего.

Использование

$result = WC_Shortcode_Checkout::order_received( $order_id );
$order_id(число)
Order ID.
По умолчанию: 0

Код WC_Shortcode_Checkout::order_received() WC 4.5.2

woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php
<?php
private static function order_received( $order_id = 0 ) {
	$order = false;

	// Get the order.
	$order_id  = apply_filters( 'woocommerce_thankyou_order_id', absint( $order_id ) );
	$order_key = apply_filters( 'woocommerce_thankyou_order_key', empty( $_GET['key'] ) ? '' : wc_clean( wp_unslash( $_GET['key'] ) ) ); // WPCS: input var ok, CSRF ok.

	if ( $order_id > 0 ) {
		$order = wc_get_order( $order_id );
		if ( ! $order || ! hash_equals( $order->get_order_key(), $order_key ) ) {
			$order = false;
		}
	}

	// Empty awaiting payment session.
	unset( WC()->session->order_awaiting_payment );

	// In case order is created from admin, but paid by the actual customer, store the ip address of the payer
	// when they visit the payment confirmation page.
	if ( $order && $order->is_created_via( 'admin' ) ) {
		$order->set_customer_ip_address( WC_Geolocation::get_ip_address() );
		$order->save();
	}

	// Empty current cart.
	wc_empty_cart();

	wc_get_template( 'checkout/thankyou.php', array( 'order' => $order ) );
}