I have an array returned to woocommerce from payment gateway as order comment. I need to access it to get a value.
The array is this:
Array ( [0] => WP_Comment Object ( [comment_ID] => 149 [comment_post_ID] => 1686 [comment_author] => [comment_author_email] => [comment_author_url] => [comment_author_IP] => [comment_date] => 2019-01-24 14:30:31 [comment_date_gmt] => 2019-01-24 12:30:31 [comment_content] => Payment done, Return data: Array ( [key] => wc_order_9Do9rqvyn29EP [uniqueID] => 1548333013414 [lang] => HE [authNumber] => 4318927 [responseMac] => b73efff34b5ba63fa8a281a6acc7fda201fb85f2c432386b70d451efb1ce35dd [cardToken] => 1090669523792340 [cardExp] => 0220 [personalId] => 314603556 [cardMask] => 432484******2340 [txId] => edf3354c-af38-49f7-810a-e79234e6604d [numberOfPayments] => [firstPayment] => [periodicalPayment] => [userData5] => 0542167008 [userData4] => user name [userData1] => yes ) [comment_karma] => 0 [comment_approved] => 1 [comment_agent] => WooCommerce [comment_type] => order_note [comment_parent] => 0 [user_id] => 0 [children:protected] => [populated_children:protected] => [post_fields:protected] => Array ( [0] => post_author [1] => post_date [2] => post_date_gmt [3] => post_content [4] => post_title [5] => post_excerpt [6] => post_status [7] => comment_status [8] => ping_status [9] => post_name [10] => to_ping [11] => pinged [12] => post_modified [13] => post_modified_gmt [14] => post_content_filtered [15] => post_parent [16] => guid [17] => menu_order [18] => post_type [19] => post_mime_type [20] => comment_count ) ) ) How to get the value of [txId] key?
I have tried:
$array[0]->comment_content->txId; $array[0]->comment_content['txId']; Im getting till [comment_content] but how to enter this
:Payment done, Return data: Array ( }