• chadpure

    (@chadpure)


    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:81

    if ( $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’;

    • This topic was modified 1 month ago by chadpure.
    • This topic was modified 1 month ago by chadpure.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support angelagrey

    (@angelagrey)

    Hi,

    We’ll address this in our next updates. Thank you for bringing this issue to our attention.

    Best regards.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.