woocommerce_save_product_cogs_value

woocommerce_save_product_cogs_value

Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.9.5

apply_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';
    				}