WC_Post_Data::deferred_product_sync()public staticWC 1.0

Sync a product.

Method of the class: WC_Post_Data{}

No Hooks.

Return

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 8.7.0

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

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