What actions and filters are available in WP Product Review
Available Filters
- wppr_templates_dir
apply_filters( 'wppr_templates_dir', $dirs )where
$dirs: array of directories that contain the templates
apply_filters( 'wppr_field', $output, $args )where
$output: the HTML output that needs to be modified. $args: the arguments that created the HTML element.
apply_filters( 'wppr_is_review_active', $is_active, $id, $model )where
$is_active: whether the review is active or not. $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_review_change_status', $status, $id, $model )where
$status: the new status. $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_name', $name, $id, $model )where
$name: the review title. $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_name_format', $name, $id, $model )where
$name: the review title. $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_price', $price, $id, $model )where
$price: the price of the product. $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_price_raw', $price, $id, $model )where
$price: the unformatted price of the product. $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_currency_code', $currency )where
$currency : the currency code to display for the given currency
apply_filters( 'wppr_currency', $currency, $id, $model )where
$currency: the currency symbol $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_click', $click, $id, $model )where
$click: the click behavior $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_images', $image, $id, $model )where
$image: the image URL of the product $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_images', $image, $id, $model )where
$image: the image URL of the product $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_review_image_size', $size, $id, $model )where
$size: the size of the product image either as a string ('thumbnail') or an array of width and height values in pixels (in that order) $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_thumb', $url, $id, $model )where
$url: the image URL of the specified size $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_rating', $rating, $id, $model )where
$rating: the final rating of the product (taking into account user influence if enabled) $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_pros', $pros, $id, $model )where
$pros: the array of pros $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_pros', $pros, $id, $model )where
$pros: the formatted array of pros $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_cons', $cons, $id, $model )where
$pros: the array of cons $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_cons_format', $cons, $id, $model )where
$pros: the formatted array of cons $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_options', $options, $id, $model )where
$options: the array of options $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_options', $options, $id, $model )where
$options: the formatted array of options $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_links', $links, $id )where
$links: the array of links in url=>text format. $id: the ID of the review.
apply_filters( 'wppr_links_format', $links, $id, $model )where
$links: the array of links in url=>text format. $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_content', $content, $id, $model )where
$content: the review content $id: the ID of the review. $model: instance of WPPR_Review_Model
apply_filters( 'wppr_get_old_option', $option, $key )where
$option: the option to use $key: the key corresponding to the option
apply_filters( 'wppr_get_default_option', $default, $key )where
$default: the option to use, if not set $key: the key corresponding to the option
apply_filters( 'wppr_pre_option_[key[', $value )where
$value: the option to use for the specific option defined by the [key]
apply_filters( 'wppr_global_style', $style)where
$style: CSS to be added as inline styles
apply_filters( 'wppr_option_name_html', $name )where
$name: the HTML to show for the option name
apply_filters( 'wppr_option_custom_icon', $icon )where
$icon: the custom icon to use, empty by default
apply_filters( 'wppr_disable_price_richsnippet', $value )where
$value: whether to disable rich snippets or not, false by default
apply_filters( 'wppr_widget_style1_buynow_link', $link, $id, $affiliate_link, $name )where
$link: the HTML anchor tag for the buy now button in widget Style 1 $id: the ID of the review $affiliate_link: the affiliate link $name: name to show on the buy now button
apply_filters( 'wppr_widget_style1_readreview_link', $link, $id, $review_link, $name )where
$link: the link for the review button in widget Style 1 $id: the ID of the review $affiliate_link: the review link $name: name to show on the review button
PRO only
apply_filters( 'wppr_shortcode_attributes', $array )where
$array: the shortcode attributes, empty by default
Available Actions
- wppr_editor_before
do_action( 'wppr_editor_before', $post )where
$post: the WP_Post object
do_action( 'wppr_editor_details_before', $post )where
$post: the WP_Post object
do_action( 'wppr_editor_details_after', $post )where
$post: the WP_Post object
do_action( 'wppr_editor_options_before', $post )where
$post: the WP_Post object
do_action( 'wppr_editor_options_after', $post )where
$post: the WP_Post object
do_action( 'wppr_editor_pros_before', $post )where
$post: the WP_Post object
do_action( 'wppr_editor_pros_after', $post )where
$post: the WP_Post object
do_action( 'wppr_editor_pros_after', $post )where
$post: the WP_Post object
do_action( 'wppr_editor_cons_after', $post )where
$post: the WP_Post object
do_action( 'wppr_editor_after', $post )where
$post: the WP_Post object
do_action( 'wppr_admin_page_before' )
do_action( 'wppr_admin_page_after' )
do_action( 'wppr_before_save', $post, $data )where
$post: the WP_Post object $data: the $_POST request
do_action( 'wppr_after_save', $post, $data )where
$post: the WP_Post object $data: the $_POST request
do_action( 'wppr_review_deactivate', $id, $model )where
$id: the ID of the review $model: instance of WPPR_Review_Model
do_action( 'wppr_review_activate', $id, $model )where
$id: the ID of the review $model: instance of WPPR_Review_Model