This code disables shop page links to the single product page so customers cannot access the product page but can still add the product to the cart.
Installation
There’s 2 steps :
- Upload the file named disable-links.js to your child theme folder.
- Copy and paste the PHP code, ( without the opening PHP tag ) to the end of your child themes functions file.
Was This Tutorial Helpful?