Files
piratepoet/lib/WooCommerce/Helper.php
Ján Mikláš f81083e046 Add wc_get_product function to WC helper
[MAILPOET-1843]
2019-04-16 16:40:45 +02:00

25 lines
502 B
PHP

<?php
namespace MailPoet\WooCommerce;
class Helper {
function isWooCommerceActive() {
return class_exists('WooCommerce');
}
function wcGetCustomerOrderCount($user_id) {
return wc_get_customer_order_count($user_id);
}
function wcGetOrder($order = false) {
return wc_get_order($order);
}
function wcPrice($price, array $args = array()) {
return wc_price($price, $args);
}
function wcGetProduct($the_product = false) {
return wc_get_product($the_product);
}
}