ID == $membership_id || has_term( 'course', 'product_cat', $post->ID ) ):
$context['notice'] = [
'class' => 'warning',
'text' => sprintf( __( 'Did you know CRAEA members get free access to our full course library? Update your account email with your CRAEA-approved email address and get full access today!'), get_permalink(JB_DASHBOARD_PAGE_ID) ),
'icon' => JB_IMG_URL . '/ico_exclamation.svg',
'full' => true,
];
// wc_add_notice( sprintf( __( 'Did you know CRAEA members get free access to our full course library? Update your account email with your CRAEA-approved email address and get full access today!'), get_permalink(JB_DASHBOARD_PAGE_ID) ), 'notice' );
endif;
$in_stock = [
[
'key' => '_stock_status',
'value' => 'instock',
'compare' => '=',
]
];
$context['product'] = $post;
$context['product']->ID = $product->get_id();
$context['product']->terms = [
'categories' => get_the_terms( $post->ID, 'product_cat' ),
'tags' => get_the_terms( $post->ID, 'product_tag' ),
];
// Rating
$average_rating = $product->get_average_rating();
$context['product']->rating = wc_get_rating_html($average_rating);
// Description Section
$context['product']->description = $product->get_description();
$context['product']->short_description = $product->get_short_description();
// Price
$context['product']->on_sale = $product->is_on_sale();
$context['product']->price = $product->get_price();
$template = 'singles/product.twig';
endif;
Timber::render( $template, $context );