Accessing values from ACF sub field (flexible content area) in PHP

I’m trying to access the values of a ACF sub field using PHP. $articles = get_posts( array( ‘posts_per_page’ => -1, ‘post_status’ => ‘publish’, ‘post_type’ => array(‘venues’, ‘suppliers’), ) ); $locations = array(); foreach ($articles as $article) { $field = get_field(‘info_items’, $article->ID, false); if( have_rows(‘info_items’) ): while( have_rows(‘parent_field’) ): the_row(); $value = get_sub_field(‘info_location’); endwhile; endif; var_dump($value);…

Details

How to create an automatic product safety check by filling in only the ingredients? [closed]

How to create an automatic product safety check by filling in only the ingredients? I have a type of “Product” and a type of “Ingredients”. Type “Product” has an entity field “Ingredients”. The “Ingredients” type has a “Safety” field with the values ​​”Toxic”, “Harmful”, “Safe”. I need on page product indicate message about safety by…

Details

using ConfigurationProperties in test

I have an ApplicationProperties that i use it in my service. When i mock the rest template in my test to test that service it results in java.lang.NullPointerException, when i replace applicationProperties.getBebusiness().getEndPointProvider() with the url, the test passes @Configuration @ConfigurationProperties(prefix = “application”, ignoreUnknownFields = false) public class ApplicationProperties { … } @Service public class ProviderServiceImpl…

Details