From d01c053cc436ebecdca4a3a97f4634630d475d6a Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Fri, 5 May 2017 13:36:46 -0400 Subject: [PATCH] Retrieval of member IDs for getting trail product links changed to suit the Advanced Custom Fields plugin --- functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.php b/functions.php index 8178122..b58eb78 100644 --- a/functions.php +++ b/functions.php @@ -238,7 +238,7 @@ add_filter('glm-get-trail-links', function($member_id) { // Get all the categories for the given product $categories = wp_get_post_terms( $product->ID, 'product_cat' ); // Explode the (hopefully) comma-separated list of member IDs into an array - $member_ids_for_product = explode(',',get_post_meta( $product->ID, 'trail_id', true)); + $member_ids_for_product = explode(',', get_field( 'trail_id', $product->ID ) ); // If the current member is in the list of IDs if (in_array($member_id, $member_ids_for_product)) { -- 2.17.1