Fix PHPStan warnings
This commit is contained in:
committed by
M. Shull
parent
5c2b34e9da
commit
6f85c27d4f
@ -5,25 +5,16 @@ class Helper {
|
||||
function isWooCommerceActive() {
|
||||
return class_exists('WooCommerce');
|
||||
}
|
||||
|
||||
function wcGetCustomerOrderCount($user_id) {
|
||||
if (! is_callable('wc_get_customer_order_count')) {
|
||||
throw new \Exception("function 'wc_get_customer_order_count' not found!");
|
||||
}
|
||||
return wc_get_customer_order_count($user_id);
|
||||
}
|
||||
function wcGetOrder($order = false) {
|
||||
if (! is_callable('wc_get_order')) {
|
||||
throw new \Exception("function 'wc_get_order' not found!");
|
||||
|
||||
}
|
||||
function wcGetOrder($order = false) {
|
||||
return wc_get_order($order);
|
||||
}
|
||||
|
||||
function wcPrice($price, array $args = array()) {
|
||||
if (! is_callable('wc_price')) {
|
||||
throw new \Exception("function 'wc_price' not found!");
|
||||
|
||||
}
|
||||
return wc_price($price, $args);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user