View Product Page

Filters

templates/shortcodes/ywpar-customers-points.php

Copied!
Copy

Show or not a specific user in .ywpar_customer_points shortcode

 Params  bool $show  YITH_WC_Points_Rewards_Customer $customer. 

templates/myaccount/ywpar-banner-get-points-profile.php

Copied!
Copy

filter the complete profile endpoint url

 Params  string $edit_account by default the edit account endpoint url. 

templates/myaccount/my-points-view.php

Copied!
Copy

worth value of the customer points

 Params  float $worth_value . 

Copied!
Copy

 Params  string $title . 

Copied!
Copy

filter the target banners

 Params  array $target_banners . 

Copied!
Copy

filter the get-points banners

 Params  array $get_points_banners . 

Copied!
Copy

filter the value of point for an item in the history

 Params  int $item_amount . 

templates/emails/latest-updates.php

Copied!
Copy

points amount value

 Params  string $amount . 

includes/functions-yith-wc-points-rewards.php

Copied!
Copy

filter the capability - defaul manage_options


Copied!
Copy

filter the roles enabeld to earn points

 Params  array $roles 

Copied!
Copy

filter the roles enabeld to redeem points

 Params  array $roles 

Copied!
Copy

filter the order statuses to earn points to show in the backend related option

 Params  array $statuses 

Copied!
Copy

filter the date placeholder for birthday option

 Params  array $dates 

Copied!
Copy

filter the date patterns for birtday option - to use with ywpar_date_placeholders filter

 Params  

Copied!
Copy

filter if to hide messages to the gustes


Copied!
Copy

enable or not the earning on Sale products


Copied!
Copy

filter if current product is on sale or not

 Params  bool $is_sale  WC_Product $product 

Copied!
Copy

 Params  array wc get orders args 

Copied!
Copy

filter the blog suffix


Copied!
Copy

Filter the query for getting ordes during user total orders amount

 Params  string $user_id the  user id  string $starter_date date in format YYYY-MM-DD 
 
Return array

Copied!
Copy

 Params  float $last_order_subtotal last order subtotal  WC_Order $last_order woocommerce order 

Copied!
Copy

 Params  string $display_price price to display.  string $action default 'earn'.  string $currency currency.  int    $qty quantity.  string $price product price.  WC_Product $product product object 

Copied!
Copy

filter the points order note message

 Params  string $message  WC_Order $order  int $points_earned  int $points_redeemed 

includes/class-yith-wc-points-rewards.php

Copied!
Copy

if the plugin can load


includes/class-yith-wc-points-rewards-share-points.php

Copied!
Copy

filter the max usable points to share coupon

 Params  int $points_usable  int $points_amount 

Copied!
Copy

filter the Share coupon code


Copied!
Copy

filter the expiration date for Shared coupon


Copied!
Copy

filter the create Share coupon args

 Params  array $args  int $points  YITH_WC_Points_Rewards_Customer $customer. 

includes/class-yith-wc-points-rewards-redeeming.php

Copied!
Copy

filter the formatted price worth

 Params  string $formatted_price_worth .  int $product_id .  int|float $price_worth .   int $points_earned . 

Copied!
Copy

filter the conversion method


Copied!
Copy

filter the rule validation

 Params  bool $validate .  YITH_WC_Points_Rewards_Customer $customer .  array $conversion .  string $currency . 

Copied!
Copy

filter the conversion rate

 Params  array 

Copied!
Copy

filter the main conversion rate

 Params  array $conversion 

Copied!
Copy

filter the main conversion rate for percentage option

 Params  array $conversion 

Copied!
Copy

filter the customer usable points

 Params  int $total_points total usable points.  int $customer id 

Copied!
Copy

filter the max discount for fixed conversion type


Copied!
Copy

filter the discount for percentage conversion type

 Params  int|float $discount .  array $conversion  int $general_max_percentage_discount 

Copied!
Copy

filter the max discount

 Params  int|float $max_discount  YITH_WC_Points_Rewards_Redeeming $_this  array $conversion 

Copied!
Copy

filter the max points

 Params  int $max_points  YITH_WC_Points_Rewards_Redeeming $_this  array $conversion 

Copied!
Copy

filter the cart item price

 Params  float|string $item_price  WC_Cart_Item $cart_item  int $product_id 

Copied!
Copy

filter cart subtotal


Copied!
Copy

filter the max percentage discount


Copied!
Copy

filter the max points


Copied!
Copy

filter the coupon label


Copied!
Copy

filter the dicount value


Copied!
Copy

allow free shipping coupon/discount


Copied!
Copy

set if exlude tax from calculation while creating the coupon


Copied!
Copy

filter the coupon code


Copied!
Copy

set if limit the shared coupons - default true


Copied!
Copy

check coupon before remove

 Params  bool $check default true.  string $coupon code  array $applied_coupons coupons applied to the cart.  bool $ywpar_coupon_in_cart if in cart there's a redeem points coupon. 

Copied!
Copy

check coupons in cart message

 Params  string $message  string $coupon code 

Copied!
Copy

filter the discount applied message


Copied!
Copy

filter the cron time - default 'daily'

 Params  

Copied!
Copy

filter auto apply points time interval - default value 60

 Params  

Copied!
Copy

filter the max discount


Copied!
Copy


includes/class-yith-wc-points-rewards-post-types.php

Copied!
Copy

filter the register post type args

 Params  array $args . 

Copied!
Copy

filter the register post type args

 Params  array $args . 

Copied!
Copy

filter the register post type args

 Params  array $args . 

Copied!
Copy

filter the register post type args

 Params  array $args . 

includes/class-yith-wc-points-rewards-points-log.php

Copied!
Copy

best users query limit (default: 3)

 Params  int $num_of_customers number of customers 

Copied!
Copy

best users calculation type (default: positive)

 Params  string $type positive or negative  string $time time of the query (all_time, today, last_month, this_week) 

includes/class-yith-wc-points-rewards-orders.php

Copied!
Copy

filter the order status to remove earned points

 Params  array $status default is array of cancelled and failed. 

Copied!
Copy

filter the order status to assign earned points

 Params  array $status default is array of completed and processing. 

Copied!
Copy

filter the order status to remove redeemed points

 Params  array $status default is array of cancelled and failed. 

Copied!
Copy

filter the order status to assign redeemed points

 Params  array $status default is array of pending, on-hold, completed and processing. 

Copied!
Copy

filter how many posts per page to use in the query

 Params  int $value default 20. 

Copied!
Copy

filter if the order is validated

 Params  bool $is_valid .  WC_Order $order . 

Copied!
Copy

filter the points value

 Params  int $points .  int|float $points_from_price .  int|float $points_from_product .  int $product_id .  bool $integer .  WC_Order_Item_Product $order_item . 

Copied!
Copy

filter if deduce the order points

 Params  bool $is_deduce .  int $order_id . 

Copied!
Copy

filter the statuses to which apply the operation

 Params array $statuses default wc-processing and wc-completed. 

includes/class-yith-wc-points-rewards-import-export.php

Copied!
Copy

Import csv file path

 Params  string $path . 

Copied!
Copy

filter the import description label


Copied!
Copy

set if register the log of the operation or not - default 1


Copied!
Copy

filter the user meta used to export

 Params  string $meta default '_ywpar_user_total_points'.  string $format default 'id'. 

Copied!
Copy

filter the first row

 Params  array $first_row .  string $format default 'id'. 

Copied!
Copy

filter the row


includes/class-yith-wc-points-rewards-helper.php

Copied!
Copy

filter the get levels query

 Params  array $args .  string $status . 

Copied!
Copy

filter the get banners query

 Params  array $args . 

includes/class-yith-wc-points-rewards-frontend.php

Copied!
Copy

filtering the action where show the message in single product page

 Params  string $action  string $position  int $priority 

Copied!
Copy

filtering the priority where show the message in single product page

 Params  int $priority  string $position  string $action 

Copied!
Copy

filter the position where show the message in the loop

 Params  string $position default is woocommerce_after_shop_loop_item_title 

Copied!
Copy

filter the priority where show the message in the loop

 Params  int $priority default 11 

Copied!
Copy

the classes of messages in cart/checkout

 Params  array $classes list of the classes.  string $message_type the type of message. 

Copied!
Copy

the cart messages in cart/checkout

 Params  string $message the message.  int $total_points total points.  int $discount the discount value. 

Copied!
Copy

the classes of messages in cart/checkout

 Params  array $classes list of the classes.  string $message_type the type of message. 

Copied!
Copy

filter the max points in rewards message

 Params  int $max_points . 

Copied!
Copy

filter the message format for fixed conversion

 Params  string $format 

Copied!
Copy

filter the message format for percentage conversion

 Params  string $format 

Copied!
Copy

filter the max points in rewards message

 Params  int $max_points . 

Copied!
Copy

filter the max discount message in redeem message

 Params  string $message .  string $type . 

Copied!
Copy

change the error message that appears on trying to use less points than the ones needed as minimum.


includes/class-yith-wc-points-rewards-extra-points.php

Copied!
Copy

filter the required account fields

 Params  array $required_fields 

Copied!
Copy

 
Return bool

Copied!
Copy

 Params  bool 

Copied!
Copy

filter to prevent or not the extra points action

 Params  bool $value the actual value - default false.  array $types Type of extra points.  int $customer_id the customer id.  int $order_id the order id. 

Copied!
Copy

Manage order total for extra points on checkout threshold

 Params  float    $total order total.  WC_Order $order the order. 

includes/class-yith-wc-points-rewards-extra-points-birthdate.php

Copied!
Copy

 Params  string $label 

Copied!
Copy

set the birtday field to be required

 Params  string $required  

includes/class-yith-wc-points-rewards-expiration-points.php

Copied!
Copy

filter description

 Params  bool $send .  string $billing_email customer billing email.  YITH_WC_Points_Rewards_Customer $customer customer object. 

includes/class-yith-wc-points-rewards-email.php

Copied!
Copy

filter the user points in the email content

 Params  int $total_points 

Copied!
Copy

filter the email css

 Params  string $css 

includes/class-yith-wc-points-rewards-earning.php

Copied!
Copy

disable earning if there's a coupon


Copied!
Copy

 Params  int                            $total_product_points  array                          $cart_item  string                         $cart_item_key  YITH_WC_Points_Rewards_Earning $this 

Copied!
Copy

filter the points calculated on the cart

 Params  int $tot_points 

Copied!
Copy

force to recalculate the points from the order items

 Params  bool $to_force  int $points the points to add  WC_Order $order the order 

Copied!
Copy

change the points value for the order

 Params  int $tot_points the points to gain.  WC_Order $order the order. 

Copied!
Copy

Manage the price before to apply conversion

 Params  float                          $price price.  string                         $currency currency.  integer                        $integer precision of points.  YITH_WC_Points_Rewards_Earning $this YITH_WC_Points_Rewards_Earning object 

Copied!
Copy

 Params  int $points_cached empty array to not use cache 

Copied!
Copy

 Params  bool $value true by default. 

Copied!
Copy

filter the points calculated for a product

 Params  int $calculated_points points for the product.  WC_Product $product the product. 

Copied!
Copy

edit the conversion rate

 Params  array $conversion 

Copied!
Copy

Change from order item subtotal to total

 Params  string                          $price item price  WC_Order                        $order Order  WC_Order_Item_Product           $order_item order item  YITH_WC_Points_Rewards_Customer $customer customer object 

includes/class-yith-wc-points-rewards-customer.php

Copied!
Copy

This filter allows adding, removing or changing the order status that the order must have to retrieve the products available for a review

 Params    array  $order_status  List of order status. 
 
Return array

Copied!
Copy

filter description

 Params  array $products list of the products to review.  int $user_id the id of the user. 

Copied!
Copy

filter the customer name

 Params  string $name the user name.  int $id the user id.  YITH_WC_Points_Rewards_Customer $customer the customer object 

Copied!
Copy

user can share points

 Params  bool $is_enabled  YITH_WC_Points_Rewards_Customer $customer the customer 

Copied!
Copy

Flush cache


Copied!
Copy

filter if user is banned

 Params  bool $is_banned if is banned  YITH_WC_Points_Rewards_Customer $customer the customer. 

Copied!
Copy

filter if user is enabled to get points or redeem

 Params  bool $is_enabled if is enabled  string $action earn or redeem.  YITH_WC_Points_Rewards_Customer $customer the customer. 

Copied!
Copy


Copied!
Copy

 Params  array  $customer_banners list of the banners  string $type Type of banner.  YITH_WC_Points_Rewards_Customer $customer the customer. 

includes/class-yith-wc-points-rewards-assets.php

Copied!
Copy

 Params  array $deps 

Copied!
Copy

hide messages


Copied!
Copy

load my account script


Copied!
Copy

use ajax to redeem


Copied!
Copy

change container class to hook the reward message

 Params string $class default .woocommerce-form-coupon  

includes/class-yith-wc-points-rewards-ajax.php

Copied!
Copy

filter the banner creation url

 Params string $url the url 

Copied!
Copy

filter the earning rule creation url

 Params string $url the url 

Copied!
Copy

filter the redeeming rule creation url

 Params string $url the url 

Copied!
Copy

filter the duplication rule url

 Params string $url the url 

includes/class-yith-wc-points-rewards-admin.php

Copied!
Copy

filter the option panel tab

 Params  array $admin_tabs admin tabs. 

Copied!
Copy

filter the arguments to create admin panel

 Params  array $panel_options the array of the args to create the admin panel. 

Copied!
Copy

change the number of items to show

 Params  int $number 

Copied!
Copy

change the number of items to show

 Params int $num 

includes/blocks/class-yith-wc-points-rewards-blocks.php

Copied!
Copy

 Params  boolean true default value 

includes/admin/class-yith-wc-points-rewards-customers-list-table.php

Copied!
Copy

 Params  array $args arguments for user query. 

includes/admin/class-yith-wc-points-rewards-customer-history-list-table.php

Copied!
Copy

filter the max number of customer's history items

 Params  integer $number of rows. 

Copied!
Copy

Show or not the calculations aside the points value for each customer history items

 Params  bool $true