• Resolved beeky2

    (@beeky2)


    Hi,

    hope you may help me.
    I’m getting this error message on vendor’s dashboard:

    Notice: Undefined property: stdClass::$On-hold in (my_website)/wp-content/plugins/dokan-lite/templates/dashboard/big-counter-widget.php on line 35

    it appears on the first section of the dashboard, the part with first overview.

    this is the code generating the error:

    foreach ( $status as $order_status ){
                        $total += $orders_count->$order_status;
                    }

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello @beeky2,

    We sincerely apologize for your trouble. Please replace the code with the below one. This should resolve the issue.

    foreach ( $status as $order_status ){
                        if( isset( $orders_count->$order_status; )){
                        $total += $orders_count->$order_status;
                    }
                    }

    Thank you!

    Thread Starter beeky2

    (@beeky2)

    Thanks, that works great!

    Hello @beeky2,

    I am glad that helped. ??

    Hello,
    I’m testing the plugin and I also experienced this issue but the solution didn’t worked for me.
    Could you please make sure that this fix is incorporated into the plugin?
    Next time there will be an update this fix will disappear, so Dokan needs to include this.
    Thanks

    • This reply was modified 4 years, 3 months ago by gponte1977.
    foreach ( $status as $order_status ){
                        if( isset( $orders_count->$order_status )){
                        $total += $orders_count->$order_status;
                    }
                    }

    This is the correct code, there’s one ; to much

    • This reply was modified 4 years, 3 months ago by gponte1977.

    Hello @gponte1977 ,

    We are sorry we could not reply earlier.

    I am glad to see you got the solution and cared about sharing it here with the fix.

    We appreciate your help.

    Thank you ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Vendor dashboard error: Notice: Undefined property: stdClass::$On-hold …’ is closed to new replies.