Add Following code to "function.php" file
function custom_woocommerce_is_purchasable( $purchasable, $product ){
if( $product->get_price() == 0 || $product->get_price() == '')
$purchasable = true;
return $purchasable;
}
add_filter( 'woocommerce_is_purchasable', 'custom_woocommerce_is_purchasable', 10, 2 );
function custom_woocommerce_is_purchasable( $purchasable, $product ){
if( $product->get_price() == 0 || $product->get_price() == '')
$purchasable = true;
return $purchasable;
}
add_filter( 'woocommerce_is_purchasable', 'custom_woocommerce_is_purchasable', 10, 2 );
0 comments:
Post a Comment