Skip to content

Instantly share code, notes, and snippets.

@ethanclevenger91
Created December 5, 2022 23:16
Show Gist options
  • Save ethanclevenger91/ac08ea99db5bbd50b49f2a7382a1b284 to your computer and use it in GitHub Desktop.
Save ethanclevenger91/ac08ea99db5bbd50b49f2a7382a1b284 to your computer and use it in GitHub Desktop.
Determine if a product is a FooEvent
<?php
// However you get a product reference
global $post;
$product = wc_get_product($post);
if($product && $product->get_meta('WooCommerceEventsEvent')) {
// it's a FooEvents product
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment