• Resolved robindijkstra

    (@robindijkstra)


    If i go to Products > All products i get a critical error, I disabled all plug-in except WooCommerce & Switched themes but i still get the error:

    Foutdetails =========== Een fout van het type E_ERROR werd veroorzaakt op regelnummer 916 van het bestand /www/kapsalonsubliem_293/public/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php. Foutmelding: Uncaught TypeError: strtolower(): Argument #1 ($string) must be of type string, array given in /www/kapsalonsubliem_293/public/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php:916 Stack trace: #0 /www/kapsalonsubliem_293/public/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php(916): strtolower(Array) #1 /www/kapsalonsubliem_293/public/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php(801): WC_Product->set_tax_status(Array) #2 /www/kapsalonsubliem_293/public/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php(373): WC_Data->set_props(Array) #3 /www/kapsalonsubliem_293/public/wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php(189): WC_Product_Data_Store_CPT->read_product_data(Object(WC_Product_Simple)) #4 /www/kapsalonsubliem_293/public/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(159): WC_Product_Data_Store_CPT->read(Object(WC_Product_Simple)) #5 /www/kapsalonsubliem_293/public/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php(138): WC_Data_Store->read(Object(WC_Product_Simple)) #6 /www/kapsalonsubliem_293/public/wp-content/plugins/woocommerce/includes/class-wc-product-simple.php(24): WC_Product->__construct(13494) #7 /www/kapsalonsubliem_293/public/wp-content/plugins/woocommerce/includes/class-wc-product-factory.php(46): WC_Product_Simple->__construct(13494, Array) #8 /www/kapsalonsubliem_293/public/wp-content/plugins/woocommerce/includes/wc-product-functions.php(73): WC_Product_Factory->get_product(13494, Array) #9 /www/kapsalonsubliem_293/public/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-assets.php(357): wc_get_product(13494) #10 /www/kapsalonsubliem_293/public/wp-includes/class-wp-hook.php(324): WC_Admin_Assets->admin_scripts(‘edit.php’) #11 /www/kapsalonsubliem_293/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #12 /www/kapsalonsubliem_293/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #13 /www/kapsalonsubliem_293/public/wp-admin/admin-header.php(118): do_action(‘admin_enqueue_s…’, ‘edit.php’) #14 /www/kapsalonsubliem_293/public/wp-admin/edit.php(411): require_once(‘/www/kapsalonsu…’) #15 {main} thrown

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @robindijkstra

    The error message you shared indicates that the function strtolower() is receiving an array as an argument, where it’s expecting a string. This is happening in the set_tax_status() function of the WC_Product class in WooCommerce.

    This issue could be due to a product’s tax status being incorrectly set as an array in your database, instead of a string.

    You might need to inspect your database, specifically the wp_postmeta table, and check the meta_key named _tax_status for all your products. Make sure that its meta_value is a string (like ‘taxable’, ‘shipping’, ‘none’) and not an array.

    Please back up your database before making any changes. If you are not comfortable doing this, you can seek help from the following:

    In the meantime, you can run a conflict test to help you identify the cause of the issue. More info: https://woocommerce.com/document/how-to-test-for-conflicts/

    Let us know how that goes for you.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @robindijkstra

    I’m marking this topic as “resolved” due to recent inactivity. If more assistance is needed, feel free to post back here or open a new topic.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error in WooCommerce Products’ is closed to new replies.