Add public keyword to methods
[MAILPOET-2413]
This commit is contained in:
@ -4,47 +4,47 @@ namespace MailPoet\WooCommerce;
|
||||
|
||||
class Helper {
|
||||
|
||||
function isWooCommerceActive() {
|
||||
public function isWooCommerceActive() {
|
||||
return class_exists('WooCommerce');
|
||||
}
|
||||
|
||||
function WC() {
|
||||
public function WC() {
|
||||
return WC();
|
||||
}
|
||||
|
||||
function wcGetCustomerOrderCount($user_id) {
|
||||
public function wcGetCustomerOrderCount($user_id) {
|
||||
return wc_get_customer_order_count($user_id);
|
||||
}
|
||||
|
||||
function wcGetOrder($order = false) {
|
||||
public function wcGetOrder($order = false) {
|
||||
return wc_get_order($order);
|
||||
}
|
||||
|
||||
function wcGetOrders(array $args) {
|
||||
public function wcGetOrders(array $args) {
|
||||
return wc_get_orders($args);
|
||||
}
|
||||
|
||||
function wcPrice($price, array $args = []) {
|
||||
public function wcPrice($price, array $args = []) {
|
||||
return wc_price($price, $args);
|
||||
}
|
||||
|
||||
function wcGetProduct($the_product = false) {
|
||||
public function wcGetProduct($the_product = false) {
|
||||
return wc_get_product($the_product);
|
||||
}
|
||||
|
||||
function getWoocommerceCurrency() {
|
||||
public function getWoocommerceCurrency() {
|
||||
return get_woocommerce_currency();
|
||||
}
|
||||
|
||||
function wcLightOrDark($color, $dark, $light) {
|
||||
public function wcLightOrDark($color, $dark, $light) {
|
||||
return wc_light_or_dark($color, $dark, $light);
|
||||
}
|
||||
|
||||
function wcHexIsLight($color) {
|
||||
public function wcHexIsLight($color) {
|
||||
return wc_hex_is_light($color);
|
||||
}
|
||||
|
||||
function getOrdersCountCreatedBefore($date_time) {
|
||||
public function getOrdersCountCreatedBefore($date_time) {
|
||||
global $wpdb;
|
||||
$result = $wpdb->get_var( "
|
||||
SELECT DISTINCT count(p.ID) FROM {$wpdb->prefix}posts as p
|
||||
@ -53,7 +53,7 @@ class Helper {
|
||||
return (int)$result;
|
||||
}
|
||||
|
||||
function getRawPrice($price, array $args = []) {
|
||||
public function getRawPrice($price, array $args = []) {
|
||||
$html_price = $this->wcPrice($price, $args);
|
||||
return html_entity_decode(strip_tags($html_price));
|
||||
}
|
||||
|
Reference in New Issue
Block a user