Translate notice Single Vendor Checkout

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Ultimate Translate notice Single Vendor Checkout

Viewing 14 reply threads
  • Author
    Posts
    • #122497
      Henriette
      Participant

      Hi,

      I’m using Single Vendor Checkout code and it works perfectly.
      The only thing is that I can not change the notice into my own language.
      I tried to change it in the functions.php code but that doesn’t change anything. Even with clearing all caches.

      Would you please be so kind to tell me how to change this notice into my language?
      Part of code >

      // We display an error message
      wc_clear_notices();
      wc_add_notice( __( "Well, you already have some item in your cart. First checkout with those and then purchase other items!", "wcfm" ), 'error' );
      }
      return $is_allow;
      }, 50, 3 );

      Thank you very much

    • #122541
      Sushobhan
      Keymaster

      Hello,
      If your site supports a single language then you can simple enter your text directly into that function-
      wc_add_notice( "write your own message in your own language, here", 'error' );
      Thanks 🙂

    • #123267
      Henriette
      Participant

      Hi Sushobhan,

      I already did that in the first place but it keeps showing the notice in English.
      I didn’t change anything in the code, only the original text.

      I got the code from here: https://docs.wclovers.com/tweaks/#single-vendor-checkout

      Edit: somehow I could not reply with the code added so I made a screenshot of what I have.

      Attachments:
      You must be logged in to view attached files.
    • #123634
      Sushobhan
      Keymaster

      Please clear your browser cache or try in incognito mode. Your edit should work as expected.

      Thank You!

    • #123694
      Henriette
      Participant
      This reply has been marked as private.
    • #123720
      Sushobhan
      Keymaster

      Hi,
      Are you using WCFM – Direct PayPal Pay plugin? As this plugin already has this restriction added in it. If yes then you don’t need this code. Then you can translate the text using Loco Translate.
      But, if that’s not the case, then I’m sure you have somehow pasted the code twice. Just search for ‘woocommerce_add_to_cart_validation’ filter. And for a quick fix just increase the function priority to anything above 50. You can find priority at the end of the code snippet

      return $is_allow;
      }, 50, 3 ); //Change 50 to 51

      Thanks!

    • #126813
      Henriette
      Participant

      Hi Sushobhan,

      Sorry for my late reply. I missed yours again.

      Just search for ‘woocommerce_add_to_cart_validation’ filter.

      I did and it was only one time in my functions.php

      And for a quick fix just increase the function priority to anything above 50. You can find priority at the end of the code snippet

      I did and it didn’t work.

      As this plugin already has this restriction added in it.

      Than I deleted the piece of code in my functions.php and the single vendor checkout kept being active so I thought it was indeed the duplicate of the paypal plugin.

      Are you using WCFM – Direct PayPal Pay plugin?

      Yes I did but since I don’t need this after all I removed the plugin.
      Deleted all caches including my browser history and uploaded the function.php file again with your original code.
      Tried it in normal browser as well in incognito mode but now it doesn’t work at all anymore.
      Now I can just put 2 different items from two different vendors in my shopping basket without blocking or warning.

      Tried one more time to change 50 to 51 but still the same. Sorry

    • #127039
      Sushobhan
      Keymaster

      Hi,

      Please share me a temporary site access to check. I’ll just check and tell you the problem, will not edit anything.

      If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

      https://wordpress.org/plugins/temporary-login-without-password/

      You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

      https://wordpress.org/plugins/wp-security-audit-log/

      Don’t forget to mark it private.

      Thank You!

    • #127078
      Henriette
      Participant
      This reply has been marked as private.
    • #127109
      Sushobhan
      Keymaster
      This reply has been marked as private.
    • #127254
      Henriette
      Participant
      This reply has been marked as private.
    • #127265
      Henriette
      Participant
      This reply has been marked as private.
      • #127333
        Sushobhan
        Keymaster
        This reply has been marked as private.
    • #127442
      Henriette
      Participant
      This reply has been marked as private.
    • #134750
      orth.bastian
      Participant

      Is there a solution to this? I’m using newest version of WCFM, and set the checkbox in the admin panel. How can i translate this error message? Above snippet isn’t working.

    • #134801
      Sushobhan
      Keymaster

      Hi,
      Thanks for getting in touch with us!
      Kindly use Loco Translate for this purpose. How to- https://docs.wclovers.com/locotranslate-translation-using-loco-translate-plugin/
      Thank You!

Viewing 14 reply threads
  • You must be logged in to reply to this topic.