Is this config possible out of the box, please? IF not please can you assist adding such restriction?
Home > Community > Forums > Free Downloads WooCommerce Pro
Allow only 2free D/Ls for specific membership level within a specific category?
Posted by: Wayne Philips
5th June 2020, 2:07 pm
-
Hi Wayne. Something like this could be achieved by setting that membership to have a 100% discount only for those categories, and then set the membership download limit to 2.
-
The issue with that is we have 6 other membership levels and using a category is not a good solution as that will be visible on the site in various places. Is there a way to add this restriction via functions PHP code?
-
Hi mate the title says you want to use a category.
You could code some PHP to do this, but you'd get the same thing with my suggestion.
-
This requirement has slightly changed... I might need help with a custom query please.
I want to allow 2 downloads to a specific member level but only from a specific taxonomy which is linked to the team they belong to (woo commerce memberships for teams)
Technically I have all the data accessible I just need to put it all together and set it up as a function
This will get me the taxonomy selectoin for a users team
$team_sectors = get_field( 'team_sectors', $teamid ); <?php if ( $team_sectors ) : ?> <?php $get_terms_args = array( 'taxonomy' => 'category', 'hide_empty' => 0, 'include' => $taxonomy_id, ); ?> <?php $terms = get_terms( $get_terms_args ); ?> <?php if ( $terms ) : ?> <?php foreach ( $terms as $term ) : ?> <a href="<?php echo esc_url( get_term_link( $term ) ); ?>"><?php echo esc_html( $term->name ); ?></a> <?php endforeach; ?> <?php endif; ?> <?php endif; ?>
But I need to add in the part about which membership level they are (should match a specific level) then do the free download limit of any 2 products in that taxonomy ?
Can you offer paid help to help finish the query?
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
@go6
2:07 pm