I would like to change the alert which displays after a user adds a product which is no longer available for purchase on the website. The error currently shows:
{product} has been removed from your basket because it can no longer be purchased. Please contact us if you need assistance.
How can I change this to a custom message?
I have tried looking for solutions which do not include installing a 3rd party plugin
Try the following to change your WooCommerce notice:
Code goes in functions.php file of your active child theme (or active theme). It should work.