• Resolved mohrefayee

    (@mohrefayee)


    Hi,

    I am unable to change the default woocommerce stock quantity message when the input number is more than the stock quantity. The default message is “Value must be less than or equal to (stock number)”, I want to change this default message with a customized one, how to do that? I didn’t find the template file also.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hey there, @mohrefayee! Thanks for contacting us.

    To do that, you would need custom code.

    While we can’t provide support for code customization as per our support policy, we do our best to offer advice and direct you to appropriate resources.

    You can visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there too.

    I’m going to leave it open for a bit to see if anyone is able to chime in and help you out further.

    Have a wonderful day!

    Thread Starter mohrefayee

    (@mohrefayee)

    Hi Carolm,

    Thanks for the reply..!

    I tried with custom code, but it didn’t work. I’m also unable to find the source file to make changes. Can you please tell me the source file’s location or at least which hook I need to use to modify changes?

    Thank you,

    Hey, @mohrefayee!

    After some further investigation, I found that WooCommerce does not have any specific error message for the quantity check. The quantity field gets a “max” attribute which allows the browser to show the error message when you put a value more than it. So the error message is not shown by your website, it is shown by the browser.

    I apologize for the misinformation I shared before.

    We have a website where you can submit feature requests and upvote the ones other people submitted and you like. You can check that out here and submit a request to add this as a WooCore feature if you want.

    Please let us know if there’s anything else we can do to help or if you have further questions.

    Have a wonderful day!

    Thread Starter mohrefayee

    (@mohrefayee)

    I think it’s not from the browser. I found the message in WooCommerce plugin files, I found the same message showing on 3 files named “index.js, edit.js, and woocommerce.pot“. I tried replacing the text on each file, but that doesn’t work for me.

    I attached the screenshots of the message and file location below for your reference.

    https://ibb.co/LxRKWRq
    https://ibb.co/7VKS0t9
    https://ibb.co/TtBwRP7

    Thank you,

    Plugin Support omarfpg a11n

    (@omarfpg)

    Hi @mohrefayee,

    Have you tried using a plugin like Say What? I’ve used that plugin successfully to modify themes or plugins’ strings to change them to wordings of my preference, too.

    I hope this helps so far!
    -OP

    Thread Starter mohrefayee

    (@mohrefayee)

    Hi @omarfpg,

    Thanks for the reply.
    I tried with Say What? plugin, but it didn’t work for me.

    ?? hey @mohrefayee

    The default message is “Value must be less than or equal to (stock number)”, I want to change this default message with a customized one, how to do that?

    I went ahead with tracking this text string in the English UK locale, for example.

    I tried with Say What? plugin, but it didn’t work for me.

    Kindly note, the string you should be searching is: Value must be less than or equal to. Linking to a screenshot of the original string here, for reference.

    There are further steps, on how that plugin can be utilized, over here.

    Feel free to reach out to its support channel (linked here), for anything further, as they would be in a better position to assist you.

    I trust that points you in the right direction, but if you have more questions, let us know.

    We’re happy to help.

    • This reply was modified 8 months, 1 week ago by anastas10s. Reason: typo
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Unable to change Value must be less than or equal to notice’ is closed to new replies.