Hello,
1. There are no shortcodes available to display pricing rules based on each user role. The plugin adjusts prices dynamically for user role\account using WooCommerce hooks. There are no database records that explicitly store “price for role X = XXX,” which could be used to create shortcodes with parameters for each role. We will add this feature to our backlog and may deliver it in the future.
2. The role-based pricing data is located in the wp_postmeta table, meta-key for role-based pricing rules is _role_based_pricing_rulesand_custome_based_pricing_rules for customer based pricing.
Those are serialized strings associated with post_id (product id), and look something like this:
a:2{s:13:"administrator";a:8{s:12:"pricing_type";s:4:"flat";s:13:"regular_price";d:10;s:10:"sale_price";
d:9;s:8:"discount";N;s:7:"minimum";i:2;s:7:"maximum";i:4;s:8:"group_of";i:1;s:10:"product_id"
;N;}s:6:"editor";a:8{s:12:"pricing_type";s:10:"percentage";s:13:"regular_price";N;s:10:"sale_price"
;N;s:8:"discount";d:20;s:7:"minimum";N;s:7:"maximum";N;s:8:"group_of";N;s:10:"product_id";N;}}
You can find there:
- user role associated with pricing rule;
- pricing_type can be “flat” and “percentage”
- for flat pricing type – regular_price and sale_price
- for percentage pricing type – discount value
- and qty rules further – min qty, max qty and “gruoup_of” stands for qty step
-
This reply was modified 7 months, 1 week ago by
Andrew Young.