I have Woocommerce Memberships. I want to show the download button if they are a member of a particular plan. However, if not I want to show the Add to Cart button. The download button is working fine. But for the items that are not in the plane it is showing: 'Want a discount? Become a member!' How can I have that show the Add To Cart button instead?
Home > Community > Forums > Free Downloads WooCommerce Pro
Add to Cart Button on select products
Posted by: kyetter
7th July 2021, 4:56 pm
-
I can give you a code snippet but you'd need to add some sort of taxonomy (category, tag) to the products you want only members to be able to download, and let me know the name of it. Or a tag to the products you want non-members to download, if that's a smaller list.
Either way let me know.
Last modified: 7th July 2021, 5:32 pm by Richard Webster
-
I'm not sure that will work. Let say person1 is signed up for the gold plan. They are logged in and can only download gold assets. If they go to an item on the silver plan, I want them to be able to purchase those items, thus the Add to Cart. I need some sort of snippet that says if not in plan, show add to cart instead of the 'Want a discount? Become a member!'
I am using product category to add them to the plan. But each user may be on a different plan. Some may have gold. Others may have silver. And some may have all.
-
If you have different plans and then different products that can be downloaded or not by those different plans, it's a level of complexity that isn't a simple snippet. It requires some way of differentiating which products apply to which plans. If you have gold products, and silver products etc.
If you want anyone without any membership at all to see the add to cart, and not have different product groups, then that's a simple snippet.
This topic is closed to new replies.
Latest Topics
-
Posted by Josh Quigley
12 Jan 2023, 9:33 pm -
Posted by nova-Institut für politische und ökologische Innovation GmbH
26 Nov 2022, 1:32 pm -
Posted by Mark Preuss
19 Sep 2022, 1:37 pm -
Posted by Ian Alport
5 Sep 2022, 8:59 am -
Posted by David
16 Aug 2022, 11:13 pm
Most Fresh Topics
-
Posted by Charlie
17 May 2019, 12:54 am -
Posted by Josh Quigley
12 Jan 2023, 9:33 pm -
Posted by nova-Institut für politische und ökologische Innovation GmbH
26 Nov 2022, 1:32 pm -
Posted by Mark Preuss
19 Sep 2022, 1:37 pm -
Posted by Ian Alport
5 Sep 2022, 8:59 am
Most Popular Topics
-
Posted by M. Hogendoorn
7 Oct 2021, 11:11 am -
Posted by newoceans
2 Jan 2018, 10:19 pm -
Posted by Elio Bergamini
23 Nov 2020, 7:32 pm -
Posted by Jeremy
23 Jan 2021, 11:17 am -
Posted by Becky Jorgensen
3 Mar 2018, 4:56 am
@kyetter
4:56 pm