Woocommerce 2.1.1. change add to cart in to single product page
-
This was the code i used before, with the current update it doesnt function anymore..
Please help..
/* replace add to cart text on button */
add_filter(‘add_to_cart_text’, ‘woo_custom_cart_button_text’);
function woo_custom_cart_button_text() {
return __(‘More Info’, ‘woocommerce’);
}
/* remove add to cart class */
add_filter(‘add_to_cart_class’, ‘woo_custom_cart_button_class’);
function woo_custom_cart_button_class() {
return __(‘more_info_button’, ‘woocommerce’);
}
/* make all products go to product page */
add_filter( ‘add_to_cart_url’, ‘woo_more_info_link’ );
function woo_more_info_link( $link ) {
global $product; // switches link in all cases, i.e. in plugins
$link = get_permalink( $product->id );
return $link;
}
- The topic ‘Woocommerce 2.1.1. change add to cart in to single product page’ is closed to new replies.