WC_Product::maybe_defer_product_sync()protectedWC 1.0

If this is a child product, queue its parent for syncing at the end of the request.

Метод класса: WC_Product{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->maybe_defer_product_sync();

Код WC_Product::maybe_defer_product_sync() WC 8.7.0

protected function maybe_defer_product_sync() {
	$parent_id = $this->get_parent_id();
	if ( $parent_id ) {
		wc_deferred_product_sync( $parent_id );
	}
}