Categories
CMS Mastering Development Wordpress

Can a plugin redirect product page based on IF condition?

I am new at WordPress and just made my first plugin to add some custom fields to WooCommerce. Depending on these custom fields, I want to redirect my product page. The active theme has a template override for single-product.php. I added some conditional logic there and used wp_redirect() to make it work. And that works […]

Categories
CMS Mastering Development Wordpress

Can a plugin redirect product page based on IF condition?

I am new at WordPress and just made my first plugin to add some custom fields to WooCommerce. Depending on these custom fields, I want to redirect my product page. The active theme has a template override for single-product.php. I added some conditional logic there and used wp_redirect() to make it work. And that works […]