Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

woocommerce backing code error

$
0
0

Replies: 0

I get the following error and I don’t know why.

Warning: count(): Parameter must be an array or an object that implements Countable in /home/customer/www/staging2.humaniticharity.org/public_html/wp-content/themes/backnow-child/wpcftemplate/woocommerce/basic/include/fund-raised.php on line 17

The code is below.

`# Backer List Item.
$baker_list = wpcf_function()->getCustomersByProduct();
$total_item = 0;
foreach($baker_list as $value){
$order = wc_get_order($value);
if ($order->get_status() == ‘completed’) {
$result = count($order->get_status());
$total_item += $result;
}
}`

this is how my page looks: https://prnt.sc/vjqk3y


Viewing all articles
Browse latest Browse all 59525

Trending Articles