Support

Search results for ""

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

DISPLAY Error

When I visit the Orders page (/wp-admin/edit.php?post_type=shop_order) or Products page (/wp-admin/edit.php?post_type=product), sometimes it showed me none of item. But if you visit Orders >> Processing page or other Orders status page, I will display right, and when you refresh some times or wait a minutes, I also will display right automatically.

I checked the PHP Error log:

2023/02/01 00:58:47 [error] 1942013#0: *7381036 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to a member function get_status() on bool in 
/wp-content/plugins/admin-columns-pro/addons/woocommerce/classes/Editing/ShopOrder/Status.php:16
Stack trace:
#0 /wp-content/plugins/admin-columns-pro/classes/Editing/RequestHandler/InlineValues.php(117): ACA\WC\Editing\ShopOrder\Status->get_value()
#1 /wp-content/plugins/admin-columns-pro/classes/Editing/RequestHandler/InlineValues.php(80): ACP\Editing\RequestHandler\InlineValues->get_values_by_column()
#2 /wp-content/plugins/admin-columns-pro/classes/Editing/RequestHandler/InlineValues.php(63): ACP\Editing\RequestHandler\InlineValues->get_values_by_list_screen()
#3 /wp-content/plugins/admin-columns-pro/classes/Editing/Addon.php(84): ACP\Editing\RequestHandler\InlineValues->handle()
#4 /wp-includes/class-wp-hook.php(308): ACP\Editing\Addon->ajax_edit_request()
#5 /www/wwwroot/v" while reading response header from upst ream, client: 240e:3b7:3237:b571:b4d9:e803:61d2:8b2c, server: www.***.com, request: "POST /wp-admin/admin-ajax.php HTTP/2.0", 
upstream: "fastcgi://unix:/tmp/php-cgi-74.sock:", host: "www.***.com", referrer: "https://www.***.com/wp-admin/edit.php?post_type=shop_order&all_posts=1"
1 year, 2 months ago
Stefan van den Dungen Gronovius
Developer

I’m not fully sure if the fatal error is the actual cause of the unexpected behavior.
But at least we fixed that part in our plugin for the next update.
Could you maybe change this in the codebase of our plugin to see if that changes anything on your website?

/admin-columns-pro/addon/woocommerce/classes/Editing/ShopOrder/Status.php

could you change the get_value method to the following:

public function get_value( int $id ) {
	$order = wc_get_order( $id );

	if ( ! $order ) {
		return null;
	}

	$status = $order->get_status();

	if ( strpos( $status, 'wc-' ) !== 0 ) {
		$status = 'wc-' . $status;
	}

	return $status;
}
1 year, 2 months ago
Zhehao Tang

Thanks for your reply.
I will try this snippet.

1 year, 2 months ago

You must be logged in to reply to this topic.