meowcrew
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce Role Based Pricing by Meow Crew] Sorting not workingIs your question related to WooCommerce Role Based Pricing by Meow Crew plugin or to WooCommerce itself? If you need help with Woo development, you can contact them here – https://www.ads-software.com/support/plugin/woocommerce.
Forum: Plugins
In reply to: [WooCommerce Role Based Pricing by Meow Crew] Extra Product Options pluginHi there,
We don’t have support for the plugin you shared, and their adding cost methods, that’s why conflict may happen. WooCommerce Role Based Pricing is only fully integrated with official Woo Product Add-ons (https://woo.com/products/product-add-ons).
We are not sure if it’s possible to make both plugins work along, since it all depends on how they modify pricing, what hooks they use, etc. However, you (or their dev/support team) can add your own hook with higher priority (role-based pricing priority = 99) if you need to prevent the WooCommerce Role Based Pricing plugin from adjusting product price ?https://prnt.sc/WfXBFaizecpq. Or you can use it to fetch the adjusted product price and then apply an extra addon cost on top of that value.
Forum: Plugins
In reply to: [WooCommerce Role Based Pricing by Meow Crew] PHP 8 compatibilityHi there,
Sure thing. I personally have been using it on versions 8.1 and 8.2 without any problems.
Forum: Plugins
In reply to: [WooCommerce Role Based Pricing by Meow Crew] Bug on bundle productsHi there,
We have this issue in the backlog. It should be fixed with the next plugin update. Stay tuned ??
Hi there,
Do you have any additional questions on this topic? If no, we’d like to close the ticket, since haven’t heard back from you for a while now.
Well, potentially there could be a few things:
- Custom Templates or AJAX Calls: The filtering plugin might be using custom templates or AJAX calls that don’t apply the standard WooCommerce filters and do not trigger the
woocommerce_product_get_price
hook.
- JavaScript Manipulation: Some plugins use JavaScript to update prices on the client-side, which could bypass server-side hooks.
- Custom WooCommerce Endpoints: If the filtering plugin uses custom endpoints for AJAX requests, these might not trigger the usual WooCommerce hooks.
You can inspect the AJAX calls (using browser developer tools) to understand how the data is being fetched and displayed. In case you find that they use custom endpoints, retrieving prices directly from the database or any other way that bypasses the standard woo hooks application, you can reach out to the plugin dev and suggest extending their AJAX calls to consider any price changes that may be applied by other plugins (since
woocommerce_product_get_price
type of hook is widely used by number of plugin devs and should be considered as common practice).Hi there. The Role and Customer Based Pricing for WooCommerce plugin modifies prices using woo hook – ‘woocommerce_product_get_price’. You can expect such things to happen when the plugin, theme, or widget you currently use gets product price directly from the database (from regular_price or sale_price) bypassing the woocommerce hooks, or if they have their own function that uses the same hook for their price changes, which rewrites adjustments made by our plugin.?
Forum: Plugins
In reply to: [WooCommerce Role Based Pricing by Meow Crew] Change Pricing by CodeOh, yeah, that should have been $rulesType.
Glad you figured that out. Have a good one!
Forum: Plugins
In reply to: [WooCommerce Role Based Pricing by Meow Crew] Change Pricing by CodeHi there,
Well, it’s a bit complicated and there’s no one hook that you can use to create whole rule. Since pricing rule should contain: product id, user role (or user account), type of pricing (flat or percentage), pricing values (regular+sale price or % discount), and if you need them – qty values (min, max, qty step).
We wrote you a code snippet that you may use to create role-based pricing rule:
<?php // Some product $productId = 10; // Type of product pricing rules we operate. $rulesType = 'role'; // Can be either "role" or "customer" /** * Create role-based (or customer-based) pricing rule */ $customPricingRule = new \MeowCrew\RoleAndCustomerBasedPricing\Entity\PricingRule( 'percentage' ); // Can be either "flat" or "percentage"; $customPricingRule->setRegularPrice( 100 ); // Will not be used, as pricing type set to percentage. $customPricingRule->setSalePrice( 90 ); // Will not be used, as pricing type set to percentage. $customPricingRule->setDiscount( 10 ); // 10% discount $customPricingRule->setMinimum( 10 ); $customPricingRule->setMaximum( 999 ); $customPricingRule->setGroupOf( 2 ); // Role slug we add the rule for $role = 'administrator'; // Get all product pricing rules (role-based) $productPricingRules = \MeowCrew\RoleAndCustomerBasedPricing\Admin\ProductPage\PricingRulesManager::getProductPricingRules( $productId, $rulesType ); // Add our custom pricing rule $productPricingRules[ $role ] = $customPricingRule; // Update all pricing rules \MeowCrew\RoleAndCustomerBasedPricing\Admin\ProductPage\PricingRulesManager::updateProductPricingRules( $productId, $productPricingRules, $type );
Here is formatted better: https://codeshare.io/yogr3n
Let me know if you have any questions on this. Cheers!
Forum: Plugins
In reply to: [WooCommerce Role Based Pricing by Meow Crew] Change Pricing by CodeHey,
Sorry, it’s still not clear what is your use case and how the API involved. Basically how Role Role-based Pricing plugin works: it gives you UI to create pricing rules, store them in the database, then retrieve values from the db and apply them to products when the user with the corresponding user role visits the store. Doesn’t matter what page the user visits (product page, archive, or post where you simply display the product with shortcode), they will see their own adjusted price. What are you trying to change in this process? At what stage do you plan to ”?update the regular/sale price of the custom role”? And what is “update” in your case? Do you plan to replace regular/sale price for user role values in db at some point or what exactly? Or you plan to generate role-based pricing rules for product w/o interacting with UI, but using some function?
Forum: Plugins
In reply to: [WooCommerce Role Based Pricing by Meow Crew] Change Pricing by CodeHi there,
That’s a bit generic question to answer. What you mean by “change pricing by role, programmatically”? The plugin already changes the price based on global or product-level pricing rules, what else are you trying to do with it? Do you want to apply role-based pricing rules (global or product-level) stored in the database to some other parts that the plugin does not affect? Or do you plan to modify the price adjustment process, add more steps to price formation, etc? Or you want to create your own type of rule to then adjust price?
Please elaborate on what exactly you are trying to achieve.Hi Linda,
Thank you for letting us know. I’ll close ticket here, since if issue will get back again, we’d need to access your staging site to track it. So, if you find it once more on staging site, please contact us through link here in your wp-admin and send credentials to the staging site – https://prnt.sc/qPHStjxEuZIk.
Cheers!
Hi there,
Can you please let us know if this is still relevant? Otherwise, we’d need to close the ticket. Or just let us know if you created a ticket through the wp-admin panel (since we haven’t seen one).
Thanks
Hi there,
It isn’t typical behavior, so there’s no advice we can give you right away. If you could share more screenshots of the plugin’s settings page, product pricing rules, view from a non-logged user account and from an account with special pricing rules set, that would be great. We can also recommend temporarily deactivating the plugins, which you may have recently installed to see if anything affects the pricing, clean server cache check if you use the latest version of the plugin. In case you can’t troubleshoot on your own, you can create a ticket through “contact us” link present on the “plugins” page for WooCommerce Role Based Pricing plugin, and send us credentials there to your staging site so we could take a look.
Forum: Plugins
In reply to: [WooCommerce Role Based Pricing by Meow Crew] WPML not copy discounted procesHi there,
Sorry, your request isn’t clear to us. WPML config doesn’t have any strict path to fields, that’s why even if the folder structure changes it doesn’t affect the WPML capabilities.
We just double-checked if it works as intended, and it is. When you use WPML Multilingual CMS + WPML String Translation and duplicate the product from one language to another: https://prnt.sc/XBxe7O66KZFo – the values (user role or account, price values, qty values) of role-based pricing are duplicated fine. That’s what this config is for.
Role-based pricing values are not text fields, its a form with pre-defined user role or user account, pricing and qty values – those fields are not translatable through editor, they are suppose to be duplicated or added manually on new product. - Custom Templates or AJAX Calls: The filtering plugin might be using custom templates or AJAX calls that don’t apply the standard WooCommerce filters and do not trigger the