tychesoftwares / price-by-user-role-for-woocommerce Goto Github PK
View Code? Open in Web Editor NEWRepository for Price by User Roles for WooCommerce - Lite
Repository for Price by User Roles for WooCommerce - Lite
Describe the bug
Add the data tracking code in the plugin to ensure all the relevant details (global settings, product settings etc.) are sent back to the tracking server.
This exercise is needed to ensure we're collecting all the relevant data (with regards to the all features added ) and utilizing the data to its fullest potential.
Additional context
https://docs.google.com/document/d/1T-4QcwvO1K-dZLFQwOxC_xvPjX4QFFXuSqt1bNn7lU4/edit
The client wants to have the feature that sets the price based on the user role and also for the particular category.
Currently, our plugin sets the price based on the user role on individual products.
Ticket link: https://tychesoftwares.freshdesk.com/a/tickets/19002
Describe the bug
The shop page is loading very slowly with our plugin as active. When we deactivate our plugin, the shop page starts loading fast.
To Reproduce
Steps to reproduce the behavior:
Note: I am able to replicate this issue only on a client's site, not on our staging site.
Expected behavior
The shop page should be loaded fast with our plugin as active.
Video
https://www.screencast.com/t/3udXZ3jx
Additional context
https://tychesoftwares.freshdesk.com/a/tickets/39213
The client has an issue where the filter of the price is not working when we set a different price for different user roles.
Suppose we have set 2 multipliers for the guest user and when we logged in as the guest user and filter the price, the price filtering is done as per the admin user role.
Screenshots:
Ticket Link: https://tychesoftwares.freshdesk.com/a/tickets/14761
Describe the bug
Product Price by User Roles: per product feature is not working and the console shows some error.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The plugin should allow to enabled Per product settings and the console does not show any error which comes from our plugin.
Describe the bug
Getting the below critical error on the "Multipliers" & "Per Product" tabs from our plugin.
To Reproduce
Steps to reproduce the behavior:
WordPress & WooCommerce version are latest.
PHP version 8.0.23 is present on the client site.
NOTE: I tried to replicate this error on my local where the PHP 8.0.0 is present but I am unable to replicate this error there.
Expected behavior
Such an error should not appear from our plugin.
Screenshots
https://www.screencast.com/t/3UcrRhT5R
Additional context
https://tychesoftwares.freshdesk.com/a/tickets/44811
When I am trying to enable price by role for more than one product then an error notice is being displayed which is correct but inside that notice, instead of the link of the pro version, HTML is being displayed. Also, the link is of wpfactory and not of our website.
Screenshot : https://prnt.sc/owudap
Describe the bug
Some deprecated warnings appear with PHP 8.2
Deprecate Creation of dynamic property Alg_WC_Price_By_User_Role::$settings is deprecated
wp-content/plugins/price-by-user-role-for-woocommerce/price-by-user-role-for-woocommerce.php:107
Deprecated Creation of dynamic property Alg_WC_Price_By_User_Role_Settings_General::$id is deprecated
wp-content/plugins/price-by-user-role-for-woocommerce/includes/settings/class-alg-wc-price-by-user-role-settings-general.php:33
Deprecated Creation of dynamic property Alg_WC_Price_By_User_Role_Settings_General::$desc is deprecated
wp-content/plugins/price-by-user-role-for-woocommerce/includes/settings/class-alg-wc-price-by-user-role-settings-general.php:34
Deprecated Creation of dynamic property Alg_WC_Price_By_User_Role_Settings_Multipliers::$id is deprecated
wp-content/plugins/price-by-user-role-for-woocommerce/includes/settings/class-alg-wc-price-by-user-role-settings-multipliers.php:33
Deprecated Creation of dynamic property Alg_WC_Price_By_User_Role_Settings_Multipliers::$desc is deprecated
wp-content/plugins/price-by-user-role-for-woocommerce/includes/settings/class-alg-wc-price-by-user-role-settings-multipliers.php:34
Deprecated Creation of dynamic property Alg_WC_Price_By_User_Role_Settings_Per_Product::$id is deprecated
wp-content/plugins/price-by-user-role-for-woocommerce/includes/settings/class-alg-wc-price-by-user-role-settings-per-product.php:33
Deprecated Creation of dynamic property Alg_WC_Price_By_User_Role_Settings_Per_Product::$desc is deprecated
wp-content/plugins/price-by-user-role-for-woocommerce/includes/settings/class-alg-wc-price-by-user-role-settings-per-product.php:34
Expected behavior
No error must be thrown from our plugin.
Describe the bug
Below warnings are displaying on the plugin's tabs.
on Multipliers Tab
Warning: Illegal string offset 'name' in /www/htdocs/w017a40b/humusziegel/wp-content/plugins/price-by-user-role-for-woocommerce/includes/settings/class-alg-wc-price-by-user-role-settings-multipliers.php on line 84
on Per Product Tab
Warning: Illegal string offset 'name' in /www/htdocs/w017a40b/humusziegel/wp-content/plugins/price-by-user-role-for-woocommerce/includes/alg-wc-price-by-user-role-functions.php on line 132
Also, there are only the Guest and Administrator Roles, but the third role "s" is displaying which is not there on the client site.
Note: I tried the same setup at our end but was unable to replicate these errors on my staging.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Such warnings should not display.
Screenshots
https://www.screencast.com/t/KITA6Z4TMc1
https://www.screencast.com/t/Wc23QUv0or
Additional context
https://tychesoftwares.freshdesk.com/a/tickets/33301
The client wants to add the extra price fields for the particular user role, not just the base ones. Currently, we have only the regular price and the sale price option.
Link: https://wordpress.org/support/topic/anyway-to-show-up-another-price-field/
The client wants to show the price of more than one user role on the frontend.
Currently, we do show only the particular user role price.
Ticket link: https://tychesoftwares.freshdesk.com/a/tickets/17876
Describe the bug
Debug log error found while doing quick testing.
To Reproduce
Steps to reproduce the behavior:
[19-Jul-2021 06:07:40 UTC] PHP Notice: Undefined index: alg_wc_price_by_user_role in C:\Users\User\Local Sites\orderdeliverydate\app\public\wp-content\plugins\woocommerce\packages\woocommerce-admin\includes\connect-existing-pages.php on line 89
[19-Jul-2021 06:07:40 UTC] PHP Stack trace:
[19-Jul-2021 06:07:40 UTC] PHP 1. {main}() C:\Users\User\Local Sites\orderdeliverydate\app\public\wp-admin\admin.php:0
[19-Jul-2021 06:07:40 UTC] PHP 2. require_once() C:\Users\User\Local Sites\orderdeliverydate\app\public\wp-admin\admin.php:239
[19-Jul-2021 06:07:40 UTC] PHP 3. do_action() C:\Users\User\Local Sites\orderdeliverydate\app\public\wp-admin\admin-header.php:251
[19-Jul-2021 06:07:40 UTC] PHP 4. WP_Hook->do_action() C:\Users\User\Local Sites\orderdeliverydate\app\public\wp-includes\plugin.php:470
[19-Jul-2021 06:07:40 UTC] PHP 5. WP_Hook->apply_filters() C:\Users\User\Local Sites\orderdeliverydate\app\public\wp-includes\class-wp-hook.php:327
[19-Jul-2021 06:07:40 UTC] PHP 6. Automattic\WooCommerce\Admin\Loader::embed_page_header() C:\Users\User\Local Sites\orderdeliverydate\app\public\wp-includes\class-wp-hook.php:303
[19-Jul-2021 06:07:40 UTC] PHP 7. Automattic\WooCommerce\Admin\Loader::get_embed_breadcrumbs() C:\Users\User\Local Sites\orderdeliverydate\app\public\wp-content\plugins\woocommerce\packages\woocommerce-admin\src\Loader.php:857
[19-Jul-2021 06:07:40 UTC] PHP 8. wc_admin_get_breadcrumbs() C:\Users\User\Local Sites\orderdeliverydate\app\public\wp-content\plugins\woocommerce\packages\woocommerce-admin\src\Loader.php:832
[19-Jul-2021 06:07:40 UTC] PHP 9. Automattic\WooCommerce\Admin\PageController->get_breadcrumbs() C:\Users\User\Local Sites\orderdeliverydate\app\public\wp-content\plugins\woocommerce\packages\woocommerce-admin\includes\page-controller-functions.php:62
[19-Jul-2021 06:07:40 UTC] PHP 10. apply_filters() C:\Users\User\Local Sites\orderdeliverydate\app\public\wp-content\plugins\woocommerce\packages\woocommerce-admin\src\PageController.php:149
[19-Jul-2021 06:07:40 UTC] PHP 11. WP_Hook->apply_filters() C:\Users\User\Local Sites\orderdeliverydate\app\public\wp-includes\plugin.php:189
[19-Jul-2021 06:07:40 UTC] PHP 12. wc_admin_filter_core_page_breadcrumbs() C:\Users\User\Local Sites\orderdeliverydate\app\public\wp-includes\class-wp-hook.php:305
Note: This issue is replicated only with WP 5.8 or lower version of WP
Expected behavior
No error should be captured from our plugin.
Able to allow the shop manager user role to edit the prices for all the added user role just same like admin user role is able to do it.
Ticket: https://tychesoftwares.freshdesk.com/a/tickets/8889
The enhancement is already done for pro plugin: https://github.com/TycheSoftwares/price-by-user-role-for-woocommerce-pro/commit/2e45ca66fce86a8ed7b6ec03a85a5830465eebfd
Describe the bug
The price set for the user role is not being considered when the order is creating manually by the site admin. Instead of that, the regular product price is being considered.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The price set for the user role should be considered even if the order is created from the backend.
Additional Context
https://support.tychesoftwares.com/conversation/2102
Describe the bug
There have been some updates to the Tyche JS and Plugin Deactivation repos.
Please update the v2 Plugin Deactivation files in the plugins where they have been implemented in.
Is your feature request related to a problem? Please describe.
Add the deactivation survey v2 in the plugin.
Describe the solution you'd like
Tyche Javascript Constructor: https://github.com/TycheSoftwares/tyche-js-constructor
Plugin Deactivation: https://github.com/TycheSoftwares/tyche-plugin-deactivation
The description of the usage is in the README.md files of the respective repos.
When we create the order manually from the backend then the prices of the products added are taken as per the admin roles, but if one wants to create the order and take the prices as per the different roles then it is not possible to do that.
So suppose, there is Product A and in that price for Customer is set as 100 and Admin Price is set to 50
now when the admin creates an order manually for his client (who is a customer) he wants the Price of the Product to be 100 and not 50. so there should be an option to select the prices as per user roles for the products added for that order.
Ticket:- https://tychesoftwares.freshdesk.com/a/tickets/26635
https://wordpress.org/support/topic/prices-per-role-for-orders-created-from-back-office/
Describe the bug
The console shows some error on the woo_order page.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No errors must be thrown from our plugin.
Describe the bug
When the plugin is deleted, the settings etc. are not deleted from the DB.
Expected behavior
The settings etc. should be deleted.
Is your feature request related to a problem? Please describe.
Client Response:
I noticed that when I create a product and I switch the dropdown from "Enabled: Off" to "Enabled: On" the fields (Price by User Role)) doesn't drop down until I update it. This is annoying to do, can this be fixed?
Describe the solution you'd like
Yes I would change that to load the fields when the dropdown is set to yes and then hide them when the option is set to no. You can do that with AJAX to load it when the options change.
Additional context
Screenshot of the Product page: https://prnt.sc/mf2xek
Describe the bug
Fix the below error from the "alg-wc-price-by-user-role-functions.php" file. This issue is responsible for not presenting any user role in the "Per product" options.
To Reproduce
Steps to reproduce the behavior:
One client has mentioned this bug with the below details:
Error is at line 137 of includes/alg-wc-price-by-user-role-functions.php.
You use the variable $role_data that does not exist and it is confused with $_role from the foreach.
if ( ! function_exists( 'alg_get_user_roles_options' ) ) { /** * Alg_get_user_roles_options. * * @version 1.0.0 * @since 1.0.0 */ function alg_get_user_roles_options() { $all_roles = alg_get_user_roles(); $all_roles_options = array(); foreach ( $all_roles as $_role_key => $_role ) { if ( ! empty( $role_data['name'] ) ) { $all_roles_options[ $_role_key ] = $_role['name']; } } return $all_roles_options; } }
Additional context
https://tychesoftwares.freshdesk.com/a/tickets/49840
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.