Laravel
4
Вклад в тег
add_filter( 'woocommerce_get_price_html', 'product_price_free_zero_empty', 100, 2 );
function product_price_free_zero_empty( $price, $product ){
if ( '' === $product->get_price() || 0 == $product->get_price() ) {
$price = '<span class="woocommerce-Price-amount amount">Цену уточняйте</span>';
}
return $price;
}
local.ERROR: Undefined index: id
array:2 [▼
"_token" => "dXOYleK8Ev0b51JgnGjVrCLk9Xj8W2Lkto2gKB4w"
"data" => array:3 [▼
0 => array:2 [▼
"id" => "3"
"numflow" => "1"
]
1 => array:2 [▼
"id" => "4"
"numflow" => "2"
]
2 => array:2 [▼
"id" => "6"
"numflow" => "3"
]
]
]
Trying to get property 'id' of non-object