Created
December 5, 2022 23:16
-
-
Save ethanclevenger91/ac08ea99db5bbd50b49f2a7382a1b284 to your computer and use it in GitHub Desktop.
Determine if a product is a FooEvent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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