Order page critical error
-
With the free plugin active the order page has a critical error. It doesn’t matter if there are orders or not (happens on add order page). I added some code to the plugin to fix this, but it’s a temp haphazard fix.
WordPress up to date and PHP is 8.1
Error message: Uncaught Error: Call to a member function get_currency() on bool in /wp-content/plugins/woo-multi-currency/admin/order.php:81if ( $order && is_a( $order, ‘WC_Order’ ) ) {
// Safely call the get_currency method
$order_currency = $order->get_currency();
} else {
// Handle the case where the order is not valid
$order_currency = ‘Default Currency’; // Fallback or handle as needed
}
Edit, i traced it back to line 42 when $screen is created:
$screen = class_exists( ‘\Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController’ )
? wc_get_page_screen_id( ‘shop-order’ )
: ‘shop_order’;
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.