11/08/2017 at 5:41 pm
#440557
Participant
Thanks, Steve. What I want to do is get the phone numbers after an update action on an entry. I tried the following:
do_action( 'cn_updated-entry',$this);
function update_info( $this ) {
$data = array();
$entry = new cnEntry($this);
$IdIn = $entry->getId();
$data['phone_numbers'] = array(
'raw' => $entry->getPhoneNumbers( 'raw'),
'rendered' => $entry->getPhoneNumbers(),
);
}
add_action('cn_updated_entry', 'update_info');
Whenever I examine $data[‘phone_numbers’] the array with the keys ‘raw’ and ‘rendered” seem to show empty values for both keys. Can you tell me what’s wrong?
-
This reply was modified 8 years, 9 months ago by
Steven Zahm. Reason: Cleanup up code formatting to make it easier to read
