WC_Abstract_Legacy_Product::variable_product_sync
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() WC Abstract Legacy Product::variable product sync code WC 10.6.2
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 );
}
}