- Posts: 21
- Thank you received: 0
×
WooPrice Calculator PRO
[CLOSED] User role based pricing
- Enrico Venezia
-
3 years 9 months ago - 3 years 9 months ago #291
by Enrico Venezia
Enrico Venezia replied the topic: [CLOSED] User role based pricing
Hi Martijn,
You can display a different price if you know a little of PHP. You can use hooks, for example:
With this simple piece of code you can multiply the price by 3 if the user is logged in, otherwise the default price if the user is not logged in.
If you need a more complex code and you don't have a good PHP knowledgement, you can ask us a quote to " altoswebsolutions.com/contact-us "
Best regards,
Enrico
You can display a different price if you know a little of PHP. You can use hooks, for example:
add_filter('woo_price_calculator_calculate_price','cmw_custom_price',0,4);
function cmw_custom_price($price,$product_id,$simulator_id,$data){
if(is_user_logged_in()){
$price = $price*3;
}
return $price;
}
With this simple piece of code you can multiply the price by 3 if the user is logged in, otherwise the default price if the user is not logged in.
If you need a more complex code and you don't have a good PHP knowledgement, you can ask us a quote to " altoswebsolutions.com/contact-us "
Best regards,
Enrico
Last Edit: 3 years 9 months ago by Enrico Venezia.
Please Log in or Create an account to join the conversation.
- Martijn Dortland
-
Topic Author
- Offline
Less
More
3 years 9 months ago #290
by Martijn Dortland
Martijn Dortland created the topic: [CLOSED] User role based pricing
Hello,
Is it posible to make different prices for loged in users?
Greetings,
Martijn Dortland
Is it posible to make different prices for loged in users?
Greetings,
Martijn Dortland
Please Log in or Create an account to join the conversation.
Moderators: david
Time to create page: 0.140 seconds