Remove Add-To-Cart Function
There is no need for this, as the modified template file is provided. Including only the function may be confusing for users.
This commit is contained in:
parent
a507ce7ea5
commit
3bfdc7996f
|
@ -136,16 +136,3 @@ if ( ! function_exists ( 'understrap_wc_form_field_args' ) ) {
|
||||||
return $args;
|
return $args;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Change loop add-to-cart button class to Bootstrap
|
|
||||||
*/
|
|
||||||
add_filter( 'woocommerce_loop_add_to_cart_args', 'understrap_woocommerce_add_to_cart_args', 10, 2 );
|
|
||||||
|
|
||||||
if ( ! function_exists ( 'understrap_woocommerce_add_to_cart_args' ) ) {
|
|
||||||
function understrap_woocommerce_add_to_cart_args( $args, $product ) {
|
|
||||||
$args['class'] = str_replace('button','btn btn-outline-primary', 'button');
|
|
||||||
return $args;
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue