Viewing 13 replies - 16 through 28 (of 28 total)
  • Thread Starter Adrian@Marcue

    (@adrianmarcue)

    No joy ??
    Going to have to dig deeper but thanks for your help

    Plugin Contributor royho

    (@royho)

    No joy because you didn’t remover the inline CSS? To test if this is the case you can try to override it by using !important.

    So try

    .product {border:none !important;}

    Thread Starter Adrian@Marcue

    (@adrianmarcue)

    That worked! Thank you very much!
    Again, showing my ignorance, Im going to need to find out what inline CSS means.

    Cheers

    I have encountered the same issue, however I used the code above to ‘hide’ the border. I really need to reduce the border or remove it all together so as not to leave a gap between the text and the add to cart button. Any ideas?

    I have checked the woo commerece css file and cannot see reference to it in there but can find the code

    “<p class=”product” style=”border:4px solid #ccc; padding: 12px;”>”

    when inspecting the element in google chrome. Its driving me insane as It is easily fixed I imagine!

    Hi Adrian

    I am having the same problem, I’m using the woocommerce plugin – how do I change the text of ‘Select Options’ to Buy or Add to cart

    Sorry I have fixed it with WooCommerce Customizer – thanks for the post!

    Plugin Contributor James Koster

    (@jameskoster)

    Hi there,

    For other users, you can change the add-to-cart button text with the following snippet;

    For the single product page;

    add_filter('single_add_to_cart_text', 'woo_custom_cart_button_text_single');
    
    function woo_custom_cart_button_text_single() {
    
                        return __('My Button Text', 'woocommerce');
    
                }

    For the others;

    add_filter('add_to_cart_text', 'woo_custom_cart_button_text');
    
    function woo_custom_cart_button_text() {
    
                        return __('My Button Text', 'woocommerce');
    
                }

    Thanks, Jay

    I have been trying to remove the border around the cart button this is the link for my website. https://www.kathachitra.com/blog/bajanaama/ when I see it through firebug I find there are multiple classes defined
    <p class=”product woocommerce” I am not able to understand how to remove this in y style.css file.

    Dear james
    what if we need to change the text of update cart as well as your cart is empty etc hence i needed to change the cart text everywhere on the site with BASKET WHAT I NEEDED TO DO TO DO SO.. KINDLY REPLY

    I am having the same issue with the inline CSS. I have been searching almost every file contained in WooCommerce to find where it’s pulling this inline code from and cannot figure it out.

    I guess, in theory, you could use an external CSS file and use !important but I’d prefer to get rid of the inline CSS (or modify it actually, since it’s only for a specific instance when I’m using the Add to Cart hook).

    Has anyone had any luck finding where they embed this code? I’ve seen in other themes where they put it in a .js file, but like I said, I’ve had no luck.

    How do I remove or change the wording for the add_to_cart_text that displays in the Compare Products (Product Comparison Table)?

    I tried using the code <?php

    add_filter(‘single_add_to_cart_text’, ‘woo_custom_cart_button_text’);

    function woo_custom_cart_button_text() {

    return __(‘My Button Text’, ‘woocommerce’);

    } in the class-wc-compare-functions.php of Woocommerce Compare Products Plugin and replace wording My button text with learn more. It didn’t work.

    Where would I put the code for the ‘add-to-cart’ that displays when I view the results of clicking to compare products.

    You thoughts would be helpful. I have exhausted options to try.

    Thank you.

    Thanks for the tips,

    One more thing to add. To change the variable products button text you can use this:

    add_filter(‘variable_add_to_cart_text’, ‘woo_custom_cart_button_text’);

    function woo_custom_cart_button_text() {

    return __(‘My Button Text’, ‘woocommerce’);

    }

    hi i want to change the ”from” price text… and put sth like tax inclusiv… is there any way to do it?? thank you

Viewing 13 replies - 16 through 28 (of 28 total)
  • The topic ‘[Plugin: WooCommerce – excelling eCommerce] change button text – select option’ is closed to new replies.