• Zac Dreyer

    (@zacdreyer)


    Plugin stopped working WooCommerce 3.x, or so it seems. Anyway, here is a fix for it.

    1) Open /wp-content/plugins/woocommerce-new-orders-dashboard-widget/woocommerce-new-orders-dashboard.php

    2) Go to line 20 and replace

    $customer_orders = get_posts( apply_filters( 'woocommerce_my_account_my_orders_query', array(
    	'numberposts' => $od_woo_odr_no,
    	'meta_key'    => '_customer_user',
    	//'meta_value'  => get_current_user_id(),
    	'post_type'   => 'shop_order',
    	'post_status' => 'publish'
    	
    ) ) );

    WITH

    $query = new WC_Order_Query( array(
        'limit' => $od_woo_odr_no,
        'orderby' => 'date',
        'order' => 'DESC'
    ) );
    $customer_orders = $query->get_orders();
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Fix for WooCommerce 3.x’ is closed to new replies.