View Product Page

Filters

plugin-options/user-views-options.php

Copied!
Copy

Filter the available options from the User views section

Params
 array $setting The options to display.

plugin-options/price-rules-options.php

Copied!
Copy

Filter the available options from the Price rules section

Params
 array $setting The options to display.

plugin-options/general-settings-options.php

Copied!
Copy

Filter the available options from the General settings section

Params
 array $setting The options to display.

includes/class.yith-role-based-prices.php

Copied!
Copy

Filters the capability to access the plugin settings

Params
string $capability The needed capability.

includes/class.yith-role-based-prices-product.php

Copied!
Copy

Check if it should return the original price of the product

Params
 bool $return If it should return the original price.
 float $price The current price.
 WC_Product $product The current product.

Copied!
Copy

Filters the rule price for a product

Params
 float $rule_price The rule price.
 WC_Product $product The current product.

Copied!
Copy

The rule price for the view context

Params
 float $role_based_price The rule price.
 WC_Product $product The current product.

Copied!
Copy

Check if it should return the original price of the product

Params
 bool $return If it should return the original price.
 float $price The current price.
 WC_Product $product The current product.

Copied!
Copy

Filters the price HTML for the current price

Params
 string $price The current price HTML.
 WC_Product $product The current product.

Copied!
Copy

Filters the price suffix for the product

Params
 string $price_display_suffix The current price suffix.
 YITH_Role_Based_Prices_Product $this The YITH_Role_Based_Prices_Product instance.

Copied!
Copy

Check if it should display the regular price

Params
 bool $show_regular_price Show regular price.
 string $regular_price The regular price.
 array $rule_price The rule-based price and matched rules.
 WC_Product $product The current product.

Copied!
Copy

Filters the simple regular price HTML for the current product

Params
 string $regular_price_html The regular price HTML.
 string $regular_price The regular price.
 WC_Product $product The current product.
 bool $show_del Show the del element.

Copied!
Copy

Filters the simple sale price HTML for the current product

Params
 string $sale_price_html The sale price HTML.
 string $sale_price The sale price.
 WC_Product $product The current product.
 bool $show_del Show the del element.

Copied!
Copy

Filters the simple rule-based price HTML for the current product

Params
 string $rule_price_html The rule-based price HTML.
 float $rule_price The rule-based price.
 WC_Product $product The current product.
 bool $show_del Show the del element.

Return string

Copied!
Copy

Filters the current min sale price for the product

Params
 float $min_sale_price The min sale price.
 float $min_sale_price The min sale price.
 WC_Product $product The current product.

Copied!
Copy

Filters the current max sale price for the product

Params
 float $max_sale_price The max sale price.
 float $max_sale_price The max sale price.
 WC_Product $product The current product.

Copied!
Copy

Check if it should display the regular price of the variable product

Params
 bool $show_regular_price Show regular price.
 WC_Product $product The current product.
 bool $has_rule_price If the current product has matching rules.

Copied!
Copy

Filters the regular price HTML for the variable product

Params
 string $regular_price_html The regular price HTML.
 WC_Product $product The current product.
 float $min_regular_price The min regular price.
 float $max_regular_price The max regular price.

Copied!
Copy

Filters the sale price HTML for the variable product

Params
 string $sale_price_html The sale price HTML.
 WC_Product $product The current product.
 float $min_sale_price The min sale price.
 float $max_sale_price The max sale price.

Copied!
Copy

Filters the sale price HTML for the variable product

Params
 string $sale_price_html The sale price HTML.
 WC_Product $product The current product.
 float $min_sale_price The min sale price.
 float $max_sale_price The max sale price.

Copied!
Copy

Filters the regular price HTML for the grouped product

Params
 string $regular_price_html The sale price HTML.
 WC_Product $product The current product.
 float $min_original_price The min original price.
 float $max_original_price The max original price.

Copied!
Copy

Filters the price HTML for the variable product

Params
 string $price_html The price HTML.
 array $rule_price The current rule price and the matched rules.
 WC_Product $product The current product.

Copied!
Copy

Filters the regular price HTML for the product

Params
 string $regular_html The regular price HTML.
 WC_Product $product The current product.

Copied!
Copy

Filters the regular price HTML for the product

Params
 string $sale_price_html The sale price HTML.
 WC_Product $product The current product.

Copied!
Copy

Filters the template args for the 'Your price' HTML

Params
 array $template_args The current template args.
 string $your_price_html The 'Your price' HTML.
 float $role_price The rule price.
 float $display_role_price The display rule price.
 WC_Product $product The current product.
 bool $display_price Display price.
 string $message The message to include.

Copied!
Copy

Filters the 'Your price' HTML

Params
 string $price_html The display rule price.
 WC_Product $product The current product.

Copied!
Copy

Filters the 'Your price' HTML

Params
 string $price_html The display rule price.
 WC_Product $product The current product.

Copied!
Copy

Filters the rule price HTML for other roles

Params
 string $their_price_html The rule prices HTML.
 WC_Product $product The current product.

Copied!
Copy

Filters the rule price HTML for other roles

Params
 string $their_price_html The rule prices HTML.
 WC_Product $product The current product.
 string $min Min variation rule price.
 string $max Max variation rule price.

Copied!
Copy

Check if it should show the discount total for the other role prices

Params
 bool $show_discount_total Show discount total.
 WC_Product $product The current product.

Copied!
Copy

Check if it should show the discount total for the other role prices

Params
 bool $show_discount_total Show discount total.
 WC_Product $product The current product.

Copied!
Copy

Filters an array with the rule-based prices and the rules matched by the variations

Params
 array $rule_price The rule-based prices and the rules matched by the variations.
 array $variation_prices The prices of the variations.
 WC_Product $product The current product.

Copied!
Copy

Filters an array with the rule-based prices and the rules matched by the grouped product items

Params
 array $rule_price The rule-based prices and the rules matched by the grouped product items.
 array $item_prices The prices of the items.
 WC_Product $product The current product.

Copied!
Copy

Filters the total markup or discount formatted HTML for a product

Params
 string $discount_html The formatted discount HTML.
 string $discount The discount type.
 WC_Product $product The current product.

Copied!
Copy

Filters the context to be used for the product prices

Params
string $context The context to be used.

Copied!
Copy

Check if the variation price should use the newer methods

Params
bool $use_method Use newer price method.

Copied!
Copy

Filters the 'Your price' label for the price HTML.

Params
string $your_price_txt The 'Your price' label.

Copied!
Copy

Filters the 'free' price HTML.

Params
string $free_price_text The 'free' price HTML.

Copied!
Copy

Filters the 'Your price' label for the price HTML.

Params
string $your_price_txt The 'Your price' label.

Copied!
Copy

Filters the 'free' price HTML.

Params
string $free_price_text The 'free' price HTML.

Copied!
Copy

Filters the 'free' price HTML.

Params
string $price_html The 'free' price HTML.

Copied!
Copy

Filters the 'free' price HTML.

Params
string $price_html The 'free' price HTML.

Copied!
Copy

Filters the CSS class for the custom message

Params
string $class_message The CSS class.

Copied!
Copy

Filters the custom message to be printed

Params
string $custom_message The custom message.

includes/class.yith-role-based-prices-post-type.php

Copied!
Copy

DEPRECATED - Filters the query args to get the price rules

Params
 array $args The query args.
 int $product_id The current product ID.

Copied!
Copy

Filters the role that should have rules capabilities

Params
string $role The role to be used.

Copied!
Copy

Filters the labels for the price rule taxonomy

Params
array $labels The labels for the taxonomy.

includes/class.yith-role-based-prices-admin.php

Copied!
Copy

Filters the message for the delete transient action

Params
string $message The message to be displayed.

includes/class-yith-wcrbp-price-rule.php

Copied!
Copy

Filters the IDs of the product that should be checked in the price rule

Params
 array          $product_ids The product IDs.
 int|WC_Product $product The product to check for.

Copied!
Copy

Filters the IDs of the product that should be checked in the price rule

Params
 array          $product_ids The product IDs.
 int|WC_Product $product The product to check for.

includes/class-yith-wcrbp-price-rule-helper.php

Copied!
Copy

Filters the query args to be used to get the products

Params
 array $args The arguments for the query.
 false|WC_Product $product The current product to get the rules for.

Copied!
Copy

Filters the query args to be used to get the products

Params
 array $args The arguments for the query.
 false|WC_Product $product The current product to get the rules for.

Copied!
Copy

Filters the price for the product to use for the price calculation

Params
 float $product_price The current product price.
 WC_Product $product The product to calculate for.
 string $use_price Force the specific price of the product: `regular`, `sale`, or `custom`.
 float $custom_price The custom price to use for the price calculation (only if `$use_price` equals to `custom`).

Copied!
Copy

Filters whether the price calculation should only apply the user rules or not

Params
 bool $product_price The current product price.
 WC_Product $product The product to calculate for.

Copied!
Copy

Filters the correct product to use for the price calculation

Params
 WC_Product $product The current product.

Copied!
Copy

Check if the prices need to be rounded

Params
bool $price_rounding Apply rounding?

Return bool.

Copied!
Copy

Set the PHP rounding to be used

Params
int $type The PHP rounding const

Return int.

includes/data-stores/class-yith-wcrbp-price-rule-data-store.php

Copied!
Copy

Filters the query vars that will be used to recover the price rules

Params
 array $wp_query_args The processed query vars.
 array $query_vars The initial query vars.
 YITH_WCRBP_Price_Rule_Data_Store $object The instance of the data store.