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

wc_delete_shop_order_transients() WC 1.0

Clear all transients cache for order data.

Хуки из функции
Возвращает

Null. Ничего.

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

wc_delete_shop_order_transients( $order );
$order(число/WC_Order)
Order instance or ID.
По умолчанию: 0

Код wc delete shop order transients: woocommerce/includes/wc-order-functions.php WC 4.3.1

<?php
function wc_delete_shop_order_transients( $order = 0 ) {
	if ( is_numeric( $order ) ) {
		$order = wc_get_order( $order );
	}
	$reports             = WC_Admin_Reports::get_reports();
	$transients_to_clear = array(
		'wc_admin_report',
	);

	foreach ( $reports as $report_group ) {
		foreach ( $report_group['reports'] as $report_key => $report ) {
			$transients_to_clear[] = 'wc_report_' . $report_key;
		}
	}

	foreach ( $transients_to_clear as $transient ) {
		delete_transient( $transient );
	}

	// Clear money spent for user associated with order.
	if ( is_a( $order, 'WC_Order' ) ) {
		$order_id = $order->get_id();
		delete_user_meta( $order->get_customer_id(), '_money_spent' );
		delete_user_meta( $order->get_customer_id(), '_order_count' );
	} else {
		$order_id = 0;
	}

	// Increments the transient version to invalidate cache.
	WC_Cache_Helper::get_transient_version( 'orders', true );

	// Do the same for regular cache.
	WC_Cache_Helper::invalidate_cache_group( 'orders' );

	do_action( 'woocommerce_delete_shop_order_transients', $order_id );
}