• User Attivo •

    Cambiare testo (Aggiungi al carrello)

    Posso cambiare la scritta del bottone (aggiungi al carrello) su un tema che non è child?
    Woocommerce naturalmente


  • User •

    Sì puoi farlo, però se modifichi il tema e poi lo aggiorni potresti perdere la modifica.
    Se proprio non puoi creare un tema child potresti inserire il codice con il plugin WPCode.

    Consiglio in ogni caso di creare un tema child ed inserire questi 2 filtri nel file functions.php:

    //CAMBIO TESTO "AGGIUNGI AL CARRELLO"
    //nel loop prodotti
    add_filter( 'woocommerce_product_add_to_cart_text', 'new_woocommerce_add_to_cart_button_text_archives' );  
    function new_woocommerce_add_to_cart_button_text_archives() {
    
        return __( 'Acquista', 'text-domain' );
    
    }
    
    //in single-product.php
    add_filter( 'woocommerce_product_single_add_to_cart_text', 'new_woocommerce_add_to_cart_button_text_single' ); 
    function new_woocommerce_add_to_cart_button_text_single() {
    
        return __( 'Acquista', 'text-domain' ); 
    
    }```

  • User Attivo •

    puoi provare anche con una regola css del tipo:

    content: "Maggiori informazioni";