In this topic i would like to share code change add to cart button text on woocommrce

Please go to file function.php, Apearace > Theme Editor

// Change add to cart text on single product page
add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘woocommerce_add_to_cart_button_text_single’ );
function woocommerce_add_to_cart_button_text_single() {
return __( ‘add to cart‘, ‘woocommerce’ );
}

// Change add to cart text on product archives page
add_filter( ‘woocommerce_product_add_to_cart_text’, ‘woocommerce_add_to_cart_button_text_archives’ );
function woocommerce_add_to_cart_button_text_archives() {
return __( ‘add to cart‘, ‘woocommerce’ );
}

 584 total views,  12 views today

Related Posts

  • In this topic i would like to share code change currency symbol on woocommrce Please go to file function.php, Apearace > Theme Editor add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);function change_existing_currency_symbol( $currency_symbol, $currency ) {switch( $currency ) {case 'USD': $currency_symbol = 'USD'; break;}return $currency_symbol;}
    Tags: currency, symbol, change, woocommerce, return, function, editor, theme, apearace, function.php
  • In this topic i would like to share code change select option button text on woocommrce Please go to file function.php, Apearace > Theme Editor add_filter( 'woocommerce_product_add_to_cart_text', 'cloudttrust_change_select_options_button_text', 9999, 2 );functioncloudttrust_change_select_options_button_text( $label, $product ) {if ( $product->is_type( 'variable' ) ) {return 'select option';}return $label;}
    Tags: button, text, return, change, woocommerce, woocommerce_product_add_to_cart_text, theme, add_filter, editor, apearace
  • In this topic we would like to provide css code for customer price color for products on woocommerce this example below we change product price color to black .woocommerce-Price-amount amount{color: #000 !important;}
    Tags: price, change, woocommerce, topic, code, products, product, woo, knowledge, website
  • We would like to provide CSS code for custom woocommerce button in wordpress This code help you to custom color on button for your website /* woo button ****/.woocommerce #content input.button.alt:hover, .woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover, .woocommerce-page #content input.button.alt:hover, .woocommerce-page #respond input#submit.alt:hover, .woocommerce-page a.button.alt:hover, .woocommerce-page button.button.alt:hover,…
    Tags: knowledge, website, woocomerce, wordpress, woo, woocommerce
  • So i think some theme of wordpress with plugin woocommerce that show relate products label on single product page wrong postion, We try to using CSS for adjust this label to correct position and it working Before use CSS code for adjust relate products label CSS Code.related.products {float: left!important;} After…
    Tags: products, code, woocommerce, product, single, wordpress, theme, knowledge, website

Categories: