• Resolved tapeshwar3

    (@tapeshwar3)


    parameter 2 to be array, string given in /home/——–/public_html/wp-content/plugins/wc-vendors/classes/admin/class-admin-users.php on line 174

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

Viewing 15 replies - 1 through 15 (of 17 total)
  • Hello,
    Could you please tell me when and where you are seeing this error?
    Did you recently update?
    Does this still show if you run only WC Vendors and WooCommerce while using the Storefront theme? https://www.ads-software.com/themes/storefront/
    Cheers,
    Anna – WC Vendors

    Jamie

    (@digitalchild)

    Hello,

    This was fixed in version 2.0.5. Please go in and save your settings

    WC Vendors > Settings – click save.

    There is a broken setting stored in the db.

    cheers,

    Jamie.

    Thread Starter tapeshwar3

    (@tapeshwar3)

    problem is still same getting this warning message 4 times in vendor account

    parameter 2 to be array, string given in /home/goclickm/public_html/wp-content/plugins/wc-vendors/classes/admin/class-admin-users.php on line 174

    Warning: in_array() expects parameter 2 to be array, string given in /home/goclickm/public_html/wp-content/plugins/wc-vendors/classes/admin/class-admin-users.php on line 174

    Warning: in_array() expects parameter 2 to be array, string given in /home/goclickm/public_html/wp-content/plugins/wc-vendors/classes/admin/class-admin-users.php on line 174

    Warning: in_array() expects parameter 2 to be array, string given in /home/goclickm/public_html/wp-content/plugins/wc-vendors/classes/admin/class-admin-users.php on line 174

    you can try login with
    user id – vendor1
    pwd – vendor@gcm18

    Thread Starter tapeshwar3

    (@tapeshwar3)

    already updated the plugin to latest version that is 2.0.6

    Hi,

    Same issue here today, WCvendors and WC are in latest versions.
    How did you solve this?

    Thanks

    • This reply was modified 6 years, 5 months ago by kuantan.
    • This reply was modified 6 years, 5 months ago by kuantan.

    Hello, I’m experiencing the same issue. I am also using WC Vendors WooCommerce Bookings.

    Hello,

    I have the same error re-saving settings does not seem to help.

    a follow up:

    plugins/wc-vendors/classes/admin/class-admin-users.php line 146
    $product_types = get_option( ‘wcvendors_capability_product_types’, array()

    the warning seems to appear when the line above returns a string to $product_types

    in my case it was string(6) “simple”

    Jamie

    (@digitalchild)

    Hello,

    What version of WC Vendors are you using @themeszone? This was fixed in a recent update. I have added an extra check to make sure if its a string to convert it to an array.

    cheers,

    Jamie.

    Hi Jamie

    I have WC Vendors 2.0.9
    and WC Vendors Pro 1.5.3

    The error appears when you are a vendor with only simple product:

    https://www.evernote.com/l/ACeH8ct8-PxKD7O59ERJjKV_ey7YTG5pPvo

    https://www.evernote.com/l/ACeD_rayE5pL4YR1S1iZrwvI5JmeMtzBZks

    Jamie

    (@digitalchild)

    Hello @themezone

    I’ve added another check so this shouldn’t happen in the next release.

    cheers,

    Jamie.

    Hi,
    When is your next release scheduled? We cannot fully launch with this error in the vendor dashboard each time a product is added or edited.

    Warning: urlencode() expects parameter 1 to be string, array given in /home/swankd81/public_html/wp-includes/formatting.php on line 4790

    Thank you.

    • This reply was modified 6 years, 4 months ago by StylV123.

    Hi

    The error on line ( wc-vendors/classes/admin/class-admin-users.php on line 174 ) disappears with the update but the second one (the same kind) does not.

    wc-vendors/classes/admin/class-admin-users.php line 193

    $product_panel = get_option( ‘wcvendors_capability_product_data_tabs’, array() );

    $product_panel can too be a string and there is a foreach down there
    foreach ( $tabs as $key => $value ){
    if ( in_array($key, $product_panel ) ){
    unset( $tabs[ $key ] );
    }
    }
    Please check this also.
    Thank you.

    Jamie

    (@digitalchild)

    Hello,

    I’ve been unable to replicate this with php 7.0, 7.1 or 7.2. I’ve gone ahead and searched the code and added checks to all the options anyway. Can someone provide a screen shot of their WC Vendors > Settings > Capabilities screen? What settings are you using that is triggering this error.

    cheers,

    Jamie.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘error in wc vendors user account – parameter 2 to be array’ is closed to new replies.