Home Forums WoodMart support forum Right filter to change the “You may also like…” Heading in Product page

Right filter to change the “You may also like…” Heading in Product page

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #639805

    chefnelone
    Participant

    Hi there,

    I need to change the “You may also like…” Heading in Product page: https://www.pakot.com/en/product/hippie-rainbow-gift-wrapping-paper-roll/
    I found this code but not working. Can you tell me the filter name you used in your Theme?
    Regards,
    Walter

    add_filter( 'woocommerce_product_upsells_products_heading', 'bbloomer_translate_may_also_like' );
      
    function bbloomer_translate_may_also_like() {
       return 'Customers also purchased...';
    }
    #640072

    Hung Pham
    Keymaster

    Hi chefnelone,

    Thanks for reaching to us and appreciate your patience.

    + In order to change / translate words. Please make sure you synced the strings first before changing / translating WooCommerce, WoodMart Core plugins and WoodMart theme. You can refer to article

    https://xtemos.com/docs-topic/theme-translation/
    https://xtemos.com/docs-topic/how-to-make-woodmart-multilingual-with-wpml/

    + You are also need to select the language for the backend and theme settings for admin from the admin user profile, please edit the user’s profile and then select the language for that user it will show the same on the backend.

    + Some strings related to Wishlist / Compare / Login & Register page, you can change in Theme Settings > Shop or Theme Settings > My account https://prnt.sc/W8Tt95stG3YC

    Regards,

    #640133

    chefnelone
    Participant

    Hi there,

    I follow all the tips of your answer. But still not working. From my point of view this is not related to “translations” (I use wpml). Problem is the name of the filter ‘woocommerce_product_upsells_products_heading’. It seems to me that your theme uses other name for this filter.
    Can you please try this code in your end and let me know if it works for you?
    Keep in mind that this code changes the ‘upsells’ products (not the ‘related’ products).

    add_filter( 'woocommerce_product_upsells_products_heading', 'bbloomer_translate_may_also_like' );
      
    function bbloomer_translate_may_also_like() {
       return 'Customers also purchased...';
    }

    Regards,
    Walter.

    • This reply was modified 6 months, 3 weeks ago by chefnelone.
    • This reply was modified 6 months, 3 weeks ago by chefnelone.
    #640298

    Hung Pham
    Keymaster

    Hi chefnelone,

    First of all, I’m really sorry have taken long time to reply you due to the weekend.

    Please remove your code, and I kindly ask that you please provide me temporary wp-admin info (wp-admin URL, username, password) to the Private Content area, this will allow me to thoroughly investigate and address your concerns more efficiently.

    Regards,

    #640448

    chefnelone
    Participant

    Hi there,
    I just sent you credentials to my sandbox site.

    This is the page with the title to change: https://sandbox.latevabotiga.com/en/product/producto-prueba/
    I need to change the string “You may also like…”. Capture: https://drive.google.com/file/d/1_6Wc-3y_9HHux6sJPa7b1vQq3Lc8he4h/view?usp=sharing

    You can add the snippet here: https://sandbox.latevabotiga.com/wp-admin/admin.php?page=snippets&type=php

    Please, let me know.
    Walter.

    • This reply was modified 6 months, 2 weeks ago by chefnelone.
    #640725

    Hung Pham
    Keymaster

    Hi chefnelone,

    Thanks for reaching to us.

    Try to use the code below instead of yours. Define the code in the functions.php file in your child theme.

    		add_filter('woodmart_upsells_products_args', function ( $args ) {
    			$args['element_title'] = 'Customers also purchased...';
    
    			return $args;
    		} );

    Regards,

    #640870

    chefnelone
    Participant

    Thank you very much.

    #641057

    Hung Pham
    Keymaster

    Hi chefnelone,

    Glad to hear your issue has been resolved. Keep us in mind for future questions and concerns, we’re always here to help!

    If you have a quick minute we always appreciate a 5-star rating on our theme!

    https://themeforest.net/item/woodmart-woocommerce-wordpress-theme/reviews/20264492

    Your feedback is the motivation to improve our work and services.

    Regards,

Viewing 8 posts - 1 through 8 (of 8 total)