0

I have a WooCommerce WordPress Theme installed.

The error is shown on all products pages, Here is the error:

Warning: sizeof(): Parameter must be an array or an object that implements Countablein C:\xampp\htdocs\nitro\wp-content\themes\wr-nitro\woocommerce\single-product\meta.php on line 37

Warning: sizeof(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\nitro\wp-content\themes\wr-nitro\woocommerce\single-product\meta.php on line 43

Here are the related codes:

line 37

<?php echo wc_get_product_tag_list( $product->get_id(), ', ', '<span class="tagged_as">' . _n( 'Tag:', 'Tags:', count( $product->get_tag_ids() ), 'woocommerce' ) . ' ', '</span>' ); ?>

line 43 There is no line 43, code over in line 41. I'm pasting the line 38 to 41 codes

<?php do_action( 'woocommerce_product_meta_end' ); ?></div>

I'm new to e-commerce web development now, anyone can give me the reason and how to solve this problem?

Thank you.

  • What version of WooCommerce are you running? $product->get_tag_ids() will only work for 3.0+. – Jacob Peattie Apr 15 at 8:21
  • @JacobPeattie Sir I'm using version Version 3.5.7 – Sahan Pasindu Nirmal Apr 15 at 8:23
  • 1
    The templates in your theme are outdated, so your theme needs to be updated or there are some bugs in your theme related to woocommerce template customizations and you should contact the theme authors support pages. – LoicTheAztec Apr 15 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.