Add to Cart Button on select products

Posted by: kyetter

7th July 2021, 4:56 pm

kyetter

@kyetter

7 Jul 2021
4:56 pm

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?

  • Richard Webster

    @rwebster

    7 Jul 2021
    5:12 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

  • kyetter

    @kyetter

    7 Jul 2021
    5:34 pm

    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.

  • Richard Webster

    @rwebster

    14 Jul 2021
    7:52 am

    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.