How to test for a class (from a plugin) in functions.php October 20, 2022 by Tarik Billa You should use standard php function if class_exists('WC_Product_Variation') { ...}