"mostrar boton con producto añadido" Code Answer's

You're definitely familiar with the best coding language Whatever that developers use to develop their projects and they get all their queries like "mostrar boton con producto añadido" answered properly. Developers are finding an appropriate answer about mostrar boton con producto añadido related to the Whatever coding language. By visiting this online portal developers get answers concerning Whatever codes question like mostrar boton con producto añadido. Enter your desired code related query in the search bar and get every piece of information about Whatever code related question on mostrar boton con producto añadido. 

mostrar boton con producto añadido

By Bright BuzzardBright Buzzard on Sep 08, 2020
// Cambiar el texto de añadir al carrito cuando ya está añadido

add_filter( 'woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text' );

function woo_custom_cart_button_text() {
                global $woocommerce;
                foreach($woocommerce->cart->get_cart() as $cart_item_key => $values ) {
                                $_product = $values['data'];
                                if( get_the_ID() == $_product->id ) {
                                                return __('Añadido al carrito, ¿añadir más?', 'woocommerce'); //Cambiar el texto entre comillas de lo que queréis mostrar en el botón
                                }
                }
                return __('Añadir al carrito', 'woocommerce');
}

// Cambiar texto en el archivo

add_filter( 'add_to_cart_text', 'woo_archive_custom_cart_button_text' );
function woo_archive_custom_cart_button_text() {
                global $woocommerce;
                foreach($woocommerce->cart->get_cart() as $cart_item_key => $values ) {
                                $_product = $values['data'];
                                if( get_the_ID() == $_product->id ) {
                                                return __('Añadido al carrito, ¿añadir más?', 'woocommerce'); //Cambiar el texto entre comillas de lo que queréis mostrar en el botón
                                }
                }
                return __('Añadir al carrito', 'woocommerce');
}

Source: diegol.top

Add Comment

0

All those coders who are working on the Whatever based application and are stuck on mostrar boton con producto añadido can get a collection of related answers to their query. Programmers need to enter their query on mostrar boton con producto añadido related to Whatever code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about mostrar boton con producto añadido for the programmers working on Whatever code while coding their module. Coders are also allowed to rectify already present answers of mostrar boton con producto añadido while working on the Whatever language code. Developers can add up suggestions if they deem fit any other answer relating to "mostrar boton con producto añadido". Visit this developer's friendly online web community, CodeProZone, and get your queries like mostrar boton con producto añadido resolved professionally and stay updated to the latest Whatever updates. 

Whatever answers related to "mostrar boton con producto añadido"

View All Whatever queries

Whatever queries related to "mostrar boton con producto añadido"

Browse Other Code Languages

CodeProZone