My Account Template Issue
-
Hi team,
In reviewx, you have a partial file overwriting woocommerce’s default order table (
wp-content/plugins/reviewx/partials/storefront/myaccount/order-table.php
) but this template is deprecated and troublesome in major ways:- it has inconsistent content (each order is duplicated in multiple lines for each of its items)
- is set to version 7.0.1, and we are already in Woocommerce 8.5.0
- it does not use woo’s best practices
- it runs business logic in the template partial !!
- it slows down the user’s “My Orders” page.
Here are what I suggest for a long term solution:
-> Instead of having this partial, use woo’s filters and hooks to integrate your features. More below.
-> Add Only ONE order column (using woo’s filter
woocommerce_account_orders_columns
, I saw you use it already, needs cleaing) that would have as content for each order a simpleul
list of product names with a review action (you can also add a tooltip to show the product image on hover, but not required). Example:- product A (review now)
- product B (***** manage review)
- and so on…
-> Manage order actions using woo’s filter
woocommerce_my_account_my_orders_actions
-> Migrate all business logic (calculations) in another place in your plugin and get the data via async ajax call so your plugin would not slow down the user’s “My Orders” page.
-> avoid adding your css classes or ids to partials and templates. Use specific and precise selectors using existing native classes and make sure to load your style files ONLY when absolutely required to not impact performance.
Best.
PS: I believe ChatGPT would be very helpful fixing all the points in couple of minutes with your expertise ?? Here is the start of a conversation I had with it on the matter: https://chat.openai.com/share/aa69952c-dbbc-4822-afc0-934147f33e60
- The topic ‘My Account Template Issue’ is closed to new replies.