• Resolved gg88

    (@gg88)


    hey I added this code to my functions.php:

    function remove_loop_button(){
    remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
    }
    add_action('init','remove_loop_button');
    
    add_action('woocommerce_after_shop_loop_item','replace_add_to_cart');
    function replace_add_to_cart() {
    global $product;
    $text = _( 'customize your basket' );
    $link = $product->get_permalink();
    echo do_shortcode('<br><a href="'.$link.'" class="button addtocartbutton">' . _('customize your basket') . '</a>');
    }

    I want to translate “customize your basket”.

    I modified the po file and added the right location of the string. When I add pll_(”) the translation is shown, but in the wrong place.

    Please help!!!

    https://www.ads-software.com/plugins/polylang/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘translate strings in functions.php’ is closed to new replies.