WordPress.org

Support

Support » Plugins and Hacks » WooCommerce » [Resolved] [Plugin: WooCommerce – excelling eCommerce] Rename "Categories" and "Products"

[Resolved] [Plugin: WooCommerce – excelling eCommerce] Rename "Categories" and "Products"

  • Hi,

    I have a WooCommerce shop with a WooTheme, it’s great, but the words “categories” and “products” that appear all over the store are not appropriate for my uses.

    How do I rename them site-wide?

    For example, I mean things like:
    – “Home / Shop / Products / Example” in the breadcrumb navigation
    – “Featured Products“, “Recent Products” and “Product Categories” on the homepage
    – “Category: Example” on the product page

    I would prefer:
    – “Authors” instead of categories
    – “Items” instead of products

    Thank you. (I have considered using attributes, but that wouldn’t work as I’m using them for other purposes.)

    http://wordpress.org/extend/plugins/woocommerce/

    P.S. I would also like to rename the “Add to cart” button to be “Purchase” or “Acquire”, and take away the quantity selectors.

Viewing 15 replies - 16 through 30 (of 44 total)
  • Actually the same goes for these on the homepage:
    – Featured Products
    – Recent Products

    They’re unchangeable for some reason…

    Plugin Author royho

    @royho

    This is something you have to research because some text could be custom by your theme and some are not. I would not know as I can’t see your theme.

    Thanks

    It’s not a custom theme, but an out-of-the-box WOoTheme (Mystile)

    Plugin Author royho

    @royho

    Hehe, that means its custom theme. Anything that is not using default WooCommerce templates is custom.

    …but there’s no way to disable the theme and have “pure” WC running anyway.

    Essentially, this theme should get along well with WC 😐

    And not override functions, as it seems to be doing now

    Plugin Author royho

    @royho

    Hmmm but you can…WC will work out of the box with just default 2011 theme if you want…But that is beside the point. Your issue isn’t because it is a custom theme or not. Is just the fact that some translations may be in the plugin and some in the theme depending on the context.

    Ah, so it’s not a bug or anything?

    Plugin Author royho

    @royho

    Nope…

    @fishfush, guess I misunderstood. Sorry for the misleading answer. Still, I can almost guarantee there is a filter for this…

    btw- “All Products” on the shop page is still set in the plugin options I referred to above.

    Yeah, I can change All Products, but nothing else.

    I looked everywhere in the settings, literally. Can you find it?

    Thanks!

    It isn’t a WooCommerce setting. And I looked and I guess it isn’t a WC filter either. In fact, I am not 100% sure that it isn’t coming from your theme.

    But you can still filter the text strings as follows: (add to your theme’s functions.php) **NB: untested

    add_filter( 'gettext', 'kia_text_strings', 20, 3 );
    /**
     * Change text strings
     *
     * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
     */
    function kia_text_strings( $translated_text, $text, $domain ) {
    
            switch ( $translated_text ) {
    
                case 'Featured Products' :
    
                    $translated_text = __( 'Featured Items', 'theme_text_domain' );
                    break;
    
                case 'Recent Products' :
    
                    $translated_text = __( 'Recent Items', 'theme_text_domain' );
                    break;
    
                case 'Product Categories' :
    
                    $translated_text = __( 'Authors', 'theme_text_domain' );
                    break;
            }
    
        return $translated_text;
    }
    Plugin Author royho

    @royho

    In my opinion, using PO file is still the best way and much easier and that is what it is used for. It’s not just for translating to a different language. In addition, it is update.

    If you hack the .po file in the WC folder then you lose your customizations every time WooCommerce updates.

    Plugin Author royho

    @royho

    No, you don’t need to hack anything…just make a copy of it to another name such as en_US.po…

    But then that file isn’t updated by WooCommerce and your .po becomes out of date as WC adds new strings, no? Perhaps that isn’t an issue if the site is in English.

Viewing 15 replies - 16 through 30 (of 44 total)
  • The topic ‘[Resolved] [Plugin: WooCommerce – excelling eCommerce] Rename "Categories" and "Products"’ is closed to new replies.
Skip to toolbar