• Resolved Abhay

    (@abhay-raj)


    Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in

    $classes = array_merge(
    $post_classes,
    array(
    'product',
    'type-product',
    'post-' . $product->get_id(),
    'status-' . $product->get_status(),
    wc_get_loop_class(),
    $product->get_stock_status(),
    ),
    wc_get_product_taxonomy_class( $product->get_category_ids(), 'product_cat' ),
    wc_get_product_taxonomy_class( $product->get_tag_ids(), 'product_tag' )
    );

    I am getting error in woocommerce after upgrating php 8 on line 658 under /woocommerce/includes/wc-template-functions.php

    can you help me?
    Thanks in advance.

    • This topic was modified 1 month, 1 week ago by Abhay.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @abhay-raj,

    Thank you for reaching out.

    Based on the error message, it appears you’re experiencing an issue with the ‘array_merge()’ function after upgrading to PHP 8. This function is expecting an array, but it’s receiving a null value.

    This could be due to several reasons, such as a compatibility issue with PHP 8, a plugin conflict, or an issue with your theme.

    As a first step, I recommend you ensure that all your plugins and themes are updated to the latest versions, as this could potentially resolve the issue if it’s due to a compatibility problem.

    If the issue persists, try deactivating all plugins (except WooCommerce) and switch to a default theme like Twenty Twenty-Four or Storefront. If the error disappears, reactivate your plugins one by one to identify the source of the conflict.

    Should none of the above steps resolve the issue, it would be best to revert to your previous PHP version until all your plugins and themes are fully compatible with PHP 8.

    Please let us know how you get on with these steps or if you need further assistance.

    Plugin Support Feten L. a11n

    (@fetenlakhal)

    Hello! Since we haven’t heard back, I’ll mark this case as resolved. We’re here and ready to assist whenever you’re ready to pick things up.

    Thread Starter Abhay

    (@abhay-raj)

    this has been resoved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.