* * @param $check The filter value for add to cart/show details value * * @return bool validation result * * @since 1.8.3 * @author Andrea Grillo <*****@*****.**> */ public function nielsen_theme_support($check) { global $product; $vendor = yith_get_vendor($product, 'product'); return $vendor->is_valid() && $vendor->is_on_vacation() && 'disabled' == $vendor->vacation_selling ? true : $check; } } } /** * Main instance of plugin * * @return /YITH_Vendor_Vacation * @since 1.7 * @author Andrea Grillo <*****@*****.**> */ if (!function_exists('YITH_Vendor_Vacation')) { function YITH_Vendor_Vacation() { return YITH_Vendor_Vacation::instance(); } } YITH_Vendor_Vacation();
public function is_on_vacation() { return function_exists('YITH_Vendor_Vacation') ? YITH_Vendor_Vacation()->vendor_is_on_vacation($this) : false; }