Title: Error on admin/class-wc-admin-menus.php
Last modified: July 9, 2020

---

# Error on admin/class-wc-admin-menus.php

 *  Resolved [vincentra](https://wordpress.org/support/users/vincentra/)
 * (@vincentra)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/error-on-admin-class-wc-admin-menus-php/)
 * Whenever I update a product I get in my error log file these messages.
    Bold 
   lines are from a error_log(print_r($menu_order,true)); I added
 *     ```
       <strong>[Thu Jul 09 02:18:42.438120 2020] [php7:notice] [pid 23830] [client 1.1.1.1:62900] 103246, referer: https://example.net/wp-admin/</strong>
       [Thu Jul 09 02:18:42.438145 2020] [php7:warn] [pid 23830] [client 1.1.1.1:62900] PHP Warning:  array_search() expects parameter 2 to be array, int given in /var/www/html/example.net/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php on line 213, referer: https://example.net/wp-admin/
       [Thu Jul 09 02:18:42.438156 2020] [php7:warn] [pid 23830] [client 1.1.1.1:62900] PHP Warning:  array_search() expects parameter 2 to be array, int given in /var/www/html/example.net/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php on line 216, referer: https://example.net/wp-admin/
       [Thu Jul 09 02:18:42.438162 2020] [php7:warn] [pid 23830] [client 1.1.1.1:62900] PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/example.net/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php on line 219, referer: https://example.net/wp-admin/
       <strong>[Thu Jul 09 02:18:42.445246 2020] [php7:notice] [pid 23830] [client 1.1.1.1:62900] 103245, referer: https://example.net/wp-admin/</strong>
       [Thu Jul 09 02:18:42.445272 2020] [php7:warn] [pid 23830] [client 1.1.1.1:62900] PHP Warning:  array_search() expects parameter 2 to be array, int given in /var/www/html/example.net/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php on line 213, referer: https://example.net/wp-admin/
       [Thu Jul 09 02:18:42.445282 2020] [php7:warn] [pid 23830] [client 1.1.1.1:62900] PHP Warning:  array_search() expects parameter 2 to be array, int given in /var/www/html/example.net/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php on line 216, referer: https://example.net/wp-admin/
       [Thu Jul 09 02:18:42.445288 2020] [php7:warn] [pid 23830] [client 1.1.1.1:62900] PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/example.net/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php on line 219, referer: https://example.net/wp-admin/
       <strong>[Thu Jul 09 02:18:52.786825 2020] [php7:notice] [pid 24094] [client 1.1.1.1:18666] Array\n(\n    [0] => index.php\n    [1] => separator1\n    [2] => edit.php\n    [3] => upload.php\n    [4] => lmfwc_licenses\n    [5] => edit.php?post_type=page\n    [6] => edit-comments.php\n    [7] => edit.php?post_type=product\n    [8] => woocommerce\n    [9] => wc-admin&path=/analytics/revenue\n    [10] => woocommerce-marketing\n    [11] => separator2\n    [12] => themes.php\n    [13] => plugins.php\n    [14] => users.php\n    [15] => tools.php\n    [16] => edit.php?post_type=hongobuilder\n    [17] => vc-general\n    [18] => options-general.php\n    [19] => rank-math\n    [20] => wp-mail-smtp\n    [21] => separator-last\n    [22] => mycred\n    [23] => mycred_gambling_currency\n    [24] => separator-woocommerce\n    [25] => revslider\n    [26] => mailchimp-woocommerce\n    [27] => user-verification\n)\n, referer: https://example.net/wp-admin/edit.php?post_type=product</strong>
       ```
   
 * Sometimes referer shows as referer: [https://example.net/wp-admin/post.php?post=104458&action=edit](https://example.net/wp-admin/post.php?post=104458&action=edit)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Damianne P (a11n)](https://wordpress.org/support/users/drwpcom/)
 * (@drwpcom)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/error-on-admin-class-wc-admin-menus-php/#post-13103529)
 * Hi [@vincentra](https://wordpress.org/support/users/vincentra/). This kind of
   error usually indicates a conflict with another theme or plugin. Are you seeing
   any fatal errors in WooCommerce > Status > Logs? I recommend doing a conflict
   test using our [guide here](https://docs.woocommerce.com/document/how-to-test-for-conflicts/)
   to get some more info about the cause of this error message.
 *  Thread Starter [vincentra](https://wordpress.org/support/users/vincentra/)
 * (@vincentra)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/error-on-admin-class-wc-admin-menus-php/#post-13104881)
 * Thanks, I found out it was Rank Math SEO, as soon as I activate it I get the 
   errors.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error on admin/class-wc-admin-menus.php’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [vincentra](https://wordpress.org/support/users/vincentra/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/error-on-admin-class-wc-admin-menus-php/#post-13104881)
 * Status: resolved