This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import logging | |
from typing import Optional, Dict | |
from colorama import Fore, Back, Style | |
class ColoredFormatter(logging.Formatter): | |
"""Colored log formatter.""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function woocommerce_points_rewards_my_points($atts, $content = null) { // **SHORTCODE** add string ($atts, $content=null) | |
global $wc_points_rewards; | |
$points_balance = WC_Points_Rewards_Manager::get_users_points( get_current_user_id() ); | |
$points_label = $wc_points_rewards->get_points_label( $points_balance ); | |
$count = apply_filters( 'wc_points_rewards_my_account_points_events', 5, get_current_user_id() ); | |
// get a set of points events, ordered newest to oldest | |
$args = array( |