WC_Abstract_Legacy_Product::variable_product_syncpublicWC 1.0

Deprecated since 3.0.0. It is no longer supported and may be removed in future releases. Use d in core instead.

Sync variable product prices with the children lowest/highest prices.

Method of the class: WC_Abstract_Legacy_Product{}

No Hooks.

Returns

null. Nothing (null).

Usage

$WC_Abstract_Legacy_Product = new WC_Abstract_Legacy_Product();
$WC_Abstract_Legacy_Product->variable_product_sync( $product_id );
$product_id(int)
.

Changelog

Deprecated since 3.0.0 not used in core.

WC_Abstract_Legacy_Product::variable_product_sync() code WC 9.9.3

public function variable_product_sync( $product_id = 0 ) {
	wc_deprecated_function( 'WC_Product::variable_product_sync', '3.0' );
	if ( empty( $product_id ) ) {
		$product_id = $this->get_id();
	}

	// Sync prices with children
	if ( is_callable( array( __CLASS__, 'sync' ) ) ) {
		self::sync( $product_id );
	}
}