From: Laury GvR Date: Fri, 5 May 2017 17:36:46 +0000 (-0400) Subject: Retrieval of member IDs for getting trail product links changed to suit the Advanced... X-Git-Tag: v1.0.0^2~80 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=d01c053cc436ebecdca4a3a97f4634630d475d6a;p=WP-Themes%2Fmichigantrailmaps.git Retrieval of member IDs for getting trail product links changed to suit the Advanced Custom Fields plugin --- 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)) {