WC_Product::maybe_defer_product_sync()
If this is a child product, queue its parent for syncing at the end of the request.
Method of the class: WC_Product{}
No Hooks.
Return
null
. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->maybe_defer_product_sync();
WC_Product::maybe_defer_product_sync() WC Product::maybe defer product sync code WC 9.7.1
protected function maybe_defer_product_sync() { $parent_id = $this->get_parent_id(); if ( $parent_id ) { wc_deferred_product_sync( $parent_id ); } }