How can I modify sold out product status to 'on-order' in inventory?

I wonder if someone can tell me or guide me to a thread that explains how I can change the inventory status regarding the following:

Wants customers to still be able to buy products even if they are sold out.

  • When a product is sold out, I want the buy button to change to On-order and the inventory threshold to change to the following text: on-order 1-3 weeks.

Change the text on the inventory threshold so that I can have the text I want.

Hi,

  • If you want to customers can purchase even product sold out, you can disable inventory tracking in admin setting product. You can referent here.

https://help.shopify.com/en/manual/products/inventory/transfers/enable-tracking?section=Desktop

  • About check if the product is sold out then change the button text and text announcement sold out, you need to customize with liquid code.