woocommerce_save_product_cogs_value
woocommerce_save_product_cogs_value
Appears in: woocommerce.10.0.4, woocommerce.9.5.1, woocommerce.9.5.2, woocommerce.9.7.0, woocommerce.9.7.1, woocommerce.9.8.1, woocommerce.9.8.5, woocommerce.9.9.5
Hook Type: filter
Displaying hooks found in version: woocommerce.9.9.5apply_filters('woocommerce_save_product_cogs_value') is found 1 times:
- /includes/data-stores/class-wc-product-data-store-cpt.php line 766
* * @param float|null|false $cogs_value The value to be written to the database. If returned as false, nothing will be written. * @param WC_Product $product The product for which the value is being saved. */ $cogs_value = apply_filters( 'woocommerce_save_product_cogs_value', $cogs_value, $product ); if ( false !== $cogs_value ) { $updated = $this->update_or_delete_post_meta( $product, '_cogs_total_value', is_null( $cogs_value ) ? '' : $cogs_value ); if ( $updated ) { $this->updated_props[] = 'cogs_value'; }