Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Emilien Degert

Orders listing of Woocommerce broken

Hello,

The issues coming with changement of PHP7.4 to PHP 8.0 for the shop_mananger roles (for admin is fine). And i identify that comming of activation of Admins Columns Pro – Woocommerce Extension. If y have only the Admin Columns pro Activated is fine i have all the listing.

But the issue borken the listing of orders in my admin.


0  WP_List_Table->display
1  WP_List_Table->display_rows_or_placeholder
2  WP_Posts_List_Table->display_rows
3  WP_Posts_List_Table->_display_rows
4  WP_Posts_List_Table->single_row
5  WP_List_Table->single_row_columns
6  WP_Posts_List_Table->column_default
7  do_action(<code>manage_shop_order_posts_custom_column</code>)
8  WP_Hook->do_action
9  WP_Hook->apply_filters
10  AC\ListScreen\Post->manage_value
11  AC\ListScreen->get_display_value_by_column_name
12  AC\Column->get_value
13  AC\Column->get_formatted_value
14  AC\Column->get_formatted_value
15  AC\Settings\Column\UserLink->format
16  get_edit_user_link
17  current_user_can
18  user_can
19  WP_User->has_cap
20  map_meta_cap
21  apply_filters(<code>map_meta_cap</code>)
22  WP_Hook->apply_filters
23  wc_modify_map_meta_cap
24  property_exists

0  WP_List_Table->display()
       ./wp-admin/edit.php:487
1  WP_List_Table->display_rows_or_placeholder()
       ./wp-admin/includes/class-wp-list-table.php:1371
2  WP_Posts_List_Table->display_rows()
       ./wp-admin/includes/class-wp-list-table.php:1444
3  WP_Posts_List_Table->_display_rows(Array, 0)
       ./wp-admin/includes/class-wp-posts-list-table.php:783
4  WP_Posts_List_Table->single_row(WP_Post, 0)
       ./wp-admin/includes/class-wp-posts-list-table.php:807
5  WP_List_Table->single_row_columns(WP_Post)
       ./wp-admin/includes/class-wp-posts-list-table.php:1397
6  WP_Posts_List_Table->column_default(WP_Post, <code>5e7cc044a34d3</code>)
       ./wp-admin/includes/class-wp-list-table.php:1532
7  do_action(<code>manage_shop_order_posts_custom_column</code>, <code>5e7cc044a34d3</code>, 13090)
       ./wp-admin/includes/class-wp-posts-list-table.php:1363
8  WP_Hook->do_action(Array)
       ./wp-includes/plugin.php:517
9  WP_Hook->apply_filters(<code></code>, Array)
       ./wp-includes/class-wp-hook.php:332
10  AC\ListScreen\Post->manage_value(<code>5e7cc044a34d3</code>, 13090)
       ./wp-includes/class-wp-hook.php:308
11  AC\ListScreen->get_display_value_by_column_name(<code>5e7cc044a34d3</code>, 13090)
       ./wp-content/plugins/admin-columns-pro/admin-columns/classes/ListScreen/Post.php:63
12  AC\Column->get_value(13090)
       ./wp-content/plugins/admin-columns-pro/admin-columns/classes/ListScreen.php:830
13  AC\Column->get_formatted_value(<code></code>, 13090)
       ./wp-content/plugins/admin-columns-pro/admin-columns/classes/Column.php:405
14  AC\Column->get_formatted_value(<code></code>, 13090, 1)
       ./wp-content/plugins/admin-columns-pro/admin-columns/classes/Column.php:377
15  AC\Settings\Column\UserLink->format(<code></code>, 13090)
       ./wp-content/plugins/admin-columns-pro/admin-columns/classes/Column.php:375
16  get_edit_user_link(13090)
       ./wp-content/plugins/admin-columns-pro/admin-columns/classes/Settings/Column/UserLink.php:34
17  current_user_can(<code>edit_user</code>, 13090)
       ./wp-includes/link-template.php:1719
18  user_can(WP_User, <code>edit_user</code>, 13090)
       ./wp-includes/capabilities.php:873
19  WP_User->has_cap(<code>edit_user</code>, 13090)
       ./wp-includes/capabilities.php:981
20  map_meta_cap(<code>edit_user</code>, 6, 13090)
       ./wp-includes/class-wp-user.php:778
21  apply_filters(<code>map_meta_cap</code>, Array, <code>edit_user</code>, 6, Array)
       ./wp-includes/capabilities.php:838
22  WP_Hook->apply_filters(Array, Array)
       ./wp-includes/plugin.php:205
23  wc_modify_map_meta_cap(Array, <code>edit_user</code>, 6, Array)
       ./wp-includes/class-wp-hook.php:308
24  property_exists(<code></code>, <code>roles</code>)
       ./wp-content/plugins/woocommerce/includes/wc-user-functions.php:544
1 year, 4 months ago
Emilien Degert

Thank you for you response and i am available if you need more information.

1 year, 4 months ago
Stefan van den Dungen Gronovius
Developer

Thanks for sharing the issue.
But I’m missing the actual error that is happening.
You say that you only have the issue when you’re logged in as a Shop Manager.
Can you try to create a new column set with the default WC column and see if that set works for your shop managers?
If that is the case, there must be something broken in the other column set.
You can try to remove another column to see which column give the actual error so we know where to look.
Feel free to contact me by email instead of the forum if you’re sharing errors related to your environment.

1 year, 4 months ago
Emilien Degert

Hello, so i create new set of column, so is broke only when i add column with customer type of woocommerce for any data (name, email,…)

Thank you

1 year, 4 months ago
Stefan van den Dungen Gronovius
Developer

Ok, once you have that specific column added, can you send me the exact error that you see in your error.log file so I can analyze what is going wrong? Please send it to support@admincolumns.com

1 year, 4 months ago
Emilien Degert

Hello, sorry but nothing error WP_DEBUG and WP_DEBUG_LOG at true. Nothing in debug.log… Do you try te reproduce it ?

1 year, 4 months ago
alex7

Hello,

I get the same issue. I confirm that it only happens for Shop managers.
It fails for the Coupon column in my case.

Here is the complete error from the debug log:

[21-Nov-2022 13:26:23 UTC] PHP Fatal error:  Uncaught TypeError: property_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given in /home/website/wp-content/plugins/woocommerce/includes/wc-user-functions.php:568
Stack trace:
#0 /home/website/wp-content/plugins/woocommerce/includes/wc-user-functions.php(568): property_exists()
#1 /home/website/wp-includes/class-wp-hook.php(307): wc_modify_map_meta_cap()
#2 /home/website/wp-includes/plugin.php(191): WP_Hook->apply_filters()
#3 /home/website/wp-includes/capabilities.php(658): apply_filters()
#4 /home/website/wp-includes/class-wp-user.php(777): map_meta_cap()
#5 /home/website/wp-includes/capabilities.php(801): WP_User->has_cap()
#6 /home/website/wp-includes/capabilities.php(693): user_can()
#7 /home/website/wp-includes/link-template.php(1710): current_user_can()
#8 /home/website/wp-content/plugins/admin-columns-pro/admin-columns/classes/Settings/Column/UserLink.php(34): get_edit_user_link()
#9 /home/website/wp-content/plugins/admin-columns-pro/admin-columns/classes/Column.php(375): AC\Settings\Column\UserLink->format()
#10 /home/website/wp-content/plugins/admin-columns-pro/admin-columns/classes/Column.php(377): AC\Column->get_formatted_value()
#11 /home/website/wp-content/plugins/admin-columns-pro/admin-columns/classes/Column.php(405): AC\Column->get_formatted_value()
#12 /home/website/wp-content/plugins/admin-columns-pro/admin-columns/classes/ListScreen.php(830): AC\Column->get_value()
#13 /home/website/wp-content/plugins/admin-columns-pro/admin-columns/classes/ListScreen/Post.php(63): AC\ListScreen->get_display_value_by_column_name()
#14 /home/website/wp-includes/class-wp-hook.php(307): AC\ListScreen\Post->manage_value()
#15 /home/website/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#16 /home/website/wp-includes/plugin.php(476): WP_Hook->do_action()
#17 /home/website/wp-admin/includes/class-wp-posts-list-table.php(1349): do_action()
#18 /home/website/wp-admin/includes/class-wp-list-table.php(1450): WP_Posts_List_Table->column_default()
#19 /home/website/wp-admin/includes/class-wp-posts-list-table.php(1383): WP_List_Table->single_row_columns()
#20 /home/website/wp-admin/includes/class-wp-posts-list-table.php(795): WP_Posts_List_Table->single_row()
#21 /home/website/wp-admin/includes/class-wp-posts-list-table.php(772): WP_Posts_List_Table->_display_rows()
#22 /home/website/wp-admin/includes/class-wp-list-table.php(1362): WP_Posts_List_Table->display_rows()
#23 /home/website/wp-admin/includes/class-wp-list-table.php(1289): WP_List_Table->display_rows_or_placeholder()
#24 /home/website/wp-admin/edit.php(477): WP_List_Table->display()
#25 {main}
  thrown in /home/website/wp-content/plugins/woocommerce/includes/wc-user-functions.php on line 568

Hope that can helps!

Cheers

1 year, 4 months ago
Stefan van den Dungen Gronovius
Developer

Thanks for the input.
Is it correct that you’re running a multisite environment?
And can you check if you’re running the latest version of our plugin?
I’m still not able to reproduce the issue myself, but based on the files that trigger the error, I expect that this issue can only occur on a multisite environment for a specific capability check.

In the following file is a method format with inside the method a capability check current_user_can( 'edit_users' ).
admin-columns-pro/admin-columns/classes/Settings/ColumnLink.php

In older versions, the check was for edit_user when it should be edit_users. Can you check if this is the case for your environment?

1 year, 4 months ago
alex7

Hello Stefan

No, I’m running a single WordPress install and everything is up to date (AC Pro and Woo addon).

Do you mean admin-columns-pro/admin-columns/classes/Settings/Column/UserLink.php ? Because admin-columns-pro/admin-columns/classes/Settings/ColumnLink.php doesn’t exists.

Anyway, I found the format method. It uses the PROPERTY_EDIT_USER constant that’s indeed set to edit_user (line 13).

Once I updated it to edit_users, AC is working properly.

Thanks a lot! Do you plan to update ACP to reflect this change?

Cheers!

1 year, 4 months ago
Stefan van den Dungen Gronovius
Developer

Thanks for letting me know.
Yes, this is already changed in our code, so it will be shipped in the next version.
Expect this to be in version 6.

1 year, 4 months ago
alex7

Awesome! Thanks for letting us know.

All the best!

1 year, 4 months ago

You must be logged in to reply to this topic.