Try the following:
foreach($woo_post_category[0] as $key_category => $value_category) {
if ( $key_category == 'name') {
echo 'Product is in Category:' . ' ' . $value_category;
}
}
$woo_post_category is an array with one element, not an object.
So, $woo_post_category[0]this is the first element of the array, and this is your object.
foreach, $key_category (0), $value_category , stdClass.
,
if ( $key_category == 'name') {
stdClass ($key_category) 'name'. .