I'm using WooCommerce with free Artificer theme and I'm trying to change the text for My Basket and Checkout shown on image below: enter image description here

Now, I've searched the localization files for any string matching My Basket (all possible variations) and came to conclude that this isn't possible to translate using language file. Since this basket information is visible on every page I went to look into the header.php file in the themes/artificer folder and comparing to the HTML output (using Dev tools in Chrome) I came to believe the output is controlled by this line:

<?php woo_nav_before(); ?>

But, now I've spent some reasonable amount of time googling and searching the template files for where this function is defined but I can't find it for the life of me, so can someone please point me in the right direction.

2 Answers 2


The functions are defined in the includes folder of the artificer theme, in the theme-woocommerce.php file:

// Add the cart link to the header
add_action('woo_nav_before', 'artificer_header_cart_link', 20);
if ( ! function_exists( 'artificer_header_cart_link' ) ) {
    function artificer_header_cart_link() {
        if ( class_exists( 'woocommerce' ) ) { echo woocommerce_cart_link(); }

// Add the checkout link to the header
add_action('woo_nav_before', 'artificer_header_checkout_link',10);
if ( ! function_exists( 'artificer_header_checkout_link' ) ) {
    function artificer_header_checkout_link() {
        global $woocommerce;
    <a href="<?php echo $woocommerce->cart->get_checkout_url()?>" class="checkout">
        <span class="lozenge"><?php _e('Checkout','woothemes') ?></span>
<?php }

function woocommerce_cart_link() {
    global $woocommerce;
    <a href="<?php echo $woocommerce->cart->get_cart_url(); ?>" title="<?php echo     sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);?> <?php _e('in your shopping cart', 'woothemes'); ?>" class="cart-button ">
        <span class="label"><?php _e('My Basket:', 'woothemes'); ?></span>
        <?php echo $woocommerce->cart->get_cart_total();  ?>
        <span class="items"><?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count); ?></span>

edit: I realized that actually there is also one more language file which causes the translation of the "2 items" text from my image. These language files are in the artificer theme in the lang folder.

I haven't noticed this before until I used CodeStyling Localisation plugin.

Nevertheless, I haven't been able to translate "My Basket", so I changed it manually in the theme-woocommerce.php file manually.


I was able to change it by change the following below:

My Basket - <?php _e('My Basket:', 'woothemes'); ?></span>

Items- title="<?php echo sprintf(_n('%d item', '%d items', $woocommerce->

Checkout- <a href="<?php echo $woocommerce->cart->get_checkout_url()?>" class="checkout"><span class="lozenge"><?php _e('Checkout','woothemes') ?></span></a>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.