Hello,
Were using GP, along with Woocommerce, ACF, membership, and subscriptions, and using it to sale events, so I’ve added some custom fields [date] and using a snipptet to sort in date order, so far so go, however, I’m having to try to get it to sort so that it only shows today’s events and future events, any advice or pointing in the right direction would be appreciated.
Regards
Cheryl
add_filter('woocommerce_get_catalog_ordering_args', 'woocommerce_get_custom_ordering_args');
function woocommerce_get_custom_ordering_args( $args ) {
$args['order'] = 'ASC';
$args['meta_key'] = 'event_date';
$args['orderby'] = 'meta_value_num';
return $args;
}