WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports\Orders\Stats

DataStore::sync_order() public WC 1.0

Add order information to the lookup table when orders are created or modified.

{} It's a method of the class: DataStore{}

No Hooks.

Return

Int|true|false. Returns -1 if order won't be processed, or a boolean indicating processing success.

Usage

$result = DataStore::sync_order( $post_id );
$post_id(int) (required)
Post ID.

Code of DataStore::sync_order() WC 5.3.0

<?php
public static function sync_order( $post_id ) {
	if ( 'shop_order' !== get_post_type( $post_id ) && 'shop_order_refund' !== get_post_type( $post_id ) ) {
		return -1;
	}

	$order = wc_get_order( $post_id );
	if ( ! $order ) {
		return -1;
	}

	return self::update( $order );
}