woocommerce_save_product_cogs_is_additive_flag

woocommerce_save_product_cogs_is_additive_flag

Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.7.1

apply_filters('woocommerce_save_product_cogs_is_additive_flag') is found 1 times:

  • /includes/data-stores/class-wc-product-variation-data-store-cpt.php line 584
    			 *
    			 * @param bool|null $cogs_value_is_additive The flag to be written to the database. If null is returned nothing will be written or deleted.
    			 * @param WC_Product $product The product for which the flag is being saved.
    			 */
    			$cogs_value_is_additive = apply_filters( 'woocommerce_save_product_cogs_is_additive_flag', $cogs_value_is_additive, $product );
    
    			if ( ! is_null( $cogs_value_is_additive ) ) {
    				$updated = $this->update_or_delete_post_meta( $product, '_cogs_value_is_additive', $cogs_value_is_additive ? 'yes' : '' );
    				if ( $updated ) {
    					$this->updated_props[] = 'cogs_value_is_additive';
    				}