Print specific values stored in a post meta array
I'm triing to print some values stored in a post meta.
My post meta_values looks like this :
a:3:{s:6:"amount";s:117:"2.00";s:6:"entity";s:5:"11854";s:9:"reference";s:9:"800146779";}
I'm using the function bellow in order to try to print the Amount, the Entity and the Reference but all I'm getting is the first character of the Value.
Here's my function:
function get_value( $order, $parameters ) {
$order_id = Compat\Order::get_id( $order );
global $wpdb;
$ref_multibanco = get_post_meta($order_id,'_stripe_multibanco', true); // select array
return $ref_multibanco['amount']['entity']['reference'];
}
And since i'm asking I would like to print this like:
Ent: 11854 Ref: 800146779 Value: €2.00
Topic meta-value array post-meta Wordpress
Category Web