Support

Account

Home Forums General Issues Howto Inject Category Slug into get_field Reply To: Howto Inject Category Slug into get_field

  • Damn.

    I spoke too soon.

    The two categories I was testing did not contain any products which are located in multiple categories. If a product is located in multiple categories (with a REF letter set for multiple categories) then the PHP is loading the REF from the first category in the array. I added echo '<div>eref-' . $categories[0]->slug . '</div>'; into the loop to confirm that is what was happening. See the image below:

    Category Slug Inject Fail