Created by Michael Visser 2017-03-28 View revision File functions.php Added Side-by-side diff More Ignore whitespace Hide word diff +<?php +function custom_woo_pd_is_valid_product_type( $output, $product_type ) { + + // All strings are sanitized and in lowercase case without spacing + + // Set all Product Type values of "Variabile" to "Variable" + if( $product_type == 'variabile' ) + $output = 'variable'; + // Set all Product Type values of "Simple Product" to "Simple" + if( $product_type == 'simpleproduct' ) + $output = 'simple'; + + return $output; + +} +add_filter( 'woo_pd_is_valid_product_type', 'custom_woo_pd_is_valid_product_type', 10, 2 ); +?>