Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Great plugin, does the job, but one request for user-roles please #18

Closed
mazazam opened this issue Nov 7, 2018 · 1 comment
Closed

Comments

@mazazam
Copy link

mazazam commented Nov 7, 2018

We're using the WPMU DEV - Members plugin, we've assigned trade pricing on certain products based on user role, but on an individual product basis.

My question is, can we display the table ONLY to certain user roles, i've managed to get it working using the following code: if( current_user_can('wholesale_buyer') || current_user_can('administrator') )

However when I place this on line 200 and a } on line 206. I get an error saying:
[07-Nov-2018 12:55:48 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/site/public_html/wp-content/plugins/woocommerce-dynamic-pricing-table-master/woocommerce-dynamic-pricing-table.php on line 207.

Is there some PHP misconfiguration I've done?

Please advise.

@stuartduff
Copy link
Owner

I'm closing out this issue as it's a duplicate of #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants