Support

Search results for ""

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

WooCommerce Dimensions column fails on virtual products

I am getting the following error when display virtual Products, where I use the WooCommerce Dimensions column:
I assure it just requires a specific check for virtual products

[15-Feb-2023 00:47:23 UTC] PHP Fatal error: Uncaught TypeError: ACP\ConditionalFormat\Service\Formatter::format(): Return value must be of type string, bool returned in /wp-content/plugins/admin-columns-pro/classes/ConditionalFormat/Service/Formatter.php:103
Stack trace:
#0 /wp-includes/class-wp-hook.php(308): ACP\ConditionalFormat\Service\Formatter->format(false, 138148, Object(ACA\WC\Column\Product\Dimensions))
#1 /wp-includes/plugin.php(205): WP_Hook->apply_filters(false, Array)
#2 /wp-content/plugins/admin-columns-pro/admin-columns/classes/ListScreen.php(824): apply_filters(‘ac/column/value’, ‘–’, 138148, Object(ACA\WC\Column\Product\Dimensions))
#3 /wp-content/plugins/admin-columns-pro/admin-columns/classes/ListScreen/Post.php(63): AC\ListScreen->get_display_value_by_column_name(‘5a20caf71983f’, 138148)
#4 /wp-includes/class-wp-hook.php(308): AC\ListScreen\Post->manage_value(‘5a20caf71983f’, 138148)
#5 /wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#6 /wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#7 /wp-admin/includes/class-wp-posts-list-table.php(1363): do_action(‘manage_product_…’, ‘5a20caf71983f’, 138148)
#8 /wp-admin/includes/class-wp-list-table.php(1532): WP_Posts_List_Table->column_default(Object(WP_Post), ‘5a20caf71983f’)
#9 /wp-admin/includes/class-wp-posts-list-table.php(1397): WP_List_Table->single_row_columns(Object(WP_Post))
#10 /wp-admin/includes/class-wp-posts-list-table.php(807): WP_Posts_List_Table->single_row(Object(WP_Post), 0)
#11 /wp-admin/includes/class-wp-posts-list-table.php(783): WP_Posts_List_Table->_display_rows(Array, 0)
#12 /wp-admin/includes/class-wp-list-table.php(1444): WP_Posts_List_Table->display_rows()
#13 /wp-admin/includes/class-wp-list-table.php(1371): WP_List_Table->display_rows_or_placeholder()
#14 /wp-admin/edit.php(487): WP_List_Table->display()
#15 {main}
thrown in /wp-content/plugins/admin-columns-pro/classes/ConditionalFormat/Service/Formatter.php on line 103
[15-Feb-2023 00:48:28 UTC] Error checking in buffer: There are no checked out buffers

1 year ago
Stefan van den Dungen Gronovius
Developer

Do you know if you have a custom hook for ‘ac/column/value’ on your website? Since we moved to PHP version 7.2, we now also use return types. If you use this hook, you must make sure that the return value is a string. You can cast any value to a string to make sure that it is a string.

1 year ago

You must be logged in to reply to this topic.