Manipulating data from ACF field before adding to JSON response
-
I have an ACF field that is working fine for adding info with each store. I can also pull the field out into the template with:
add_filter( 'wpsl_frontend_meta_fields', 'custom_frontend_meta_fields' ); function custom_frontend_meta_fields( $store_fields ) { $store_fields['products'] = array( 'name' => 'products_at_this_store', 'type' => 'text' ); return $store_fields; }However I need to manipulate the data with PHP before sending it to the JSON Response as it is a serialised field: {i:0;s:2:”95″;i:1;s:2:”97″;i:2;s:2:”96″};
How can I do that?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Manipulating data from ACF field before adding to JSON response’ is closed to new replies.