0

while at the woocommerce order page, it show

Notice: Undefined index: post_type in /.../wp-content/plugins/woocommerce/includes/admin/list-tables/class-wc-admin-list-table-orders.php on line 848

this is the code for line 848

public function search_custom_fields( $wp ) {
    global $pagenow;

    if ( 'edit.php' !== $pagenow || empty( $wp->query_vars['s'] ) || 'shop_order' !== $wp->query_vars['post_type'] || ! isset( $_GET['s'] ) ) { // WPCS: input var ok.
        return;
    }
Cœur
  • 37,241
  • 25
  • 195
  • 267
Adam Lim
  • 51
  • 7
  • 1
    Possible duplicate of ["Notice: Undefined variable", "Notice: Undefined index", and "Notice: Undefined offset" using PHP](https://stackoverflow.com/questions/4261133/notice-undefined-variable-notice-undefined-index-and-notice-undefined) – Second2None Jan 08 '19 at 02:50
  • see the thread ady, still not sure where cause the problem.. – Adam Lim Jan 08 '19 at 02:55
  • Error is not due to the plugin. I think it is due to any customization of theme. Can you change the theme and check that the error still comes or not. – Akshay Shah Jan 08 '19 at 04:55

0 Answers0