WC_Abstract_Legacy_Product::variable_product_sync()
Deprecated from version 3.0.0. It is no longer supported and can 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.
Return
null
. Nothing.
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 7.7.0
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 ); } }