WC_Post_Data::deferred_product_syncpublic staticWC 1.0

Sync a product.

Method of the class: WC_Post_Data{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = WC_Post_Data::deferred_product_sync( $product_id );
$product_id(int) (required)
Product ID.

WC_Post_Data::deferred_product_sync() code WC 10.3.3

public static function deferred_product_sync( $product_id ) {
	$product = wc_get_product( $product_id );

	if ( is_callable( array( $product, 'sync' ) ) ) {
		$product->sync( $product );
	}
}