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
    	

    Example

  • wppr_field
  • apply_filters( 'wppr_field', $output, $args )
    	
    where
    	$output: the HTML output that needs to be modified.
    	$args: the arguments that created the HTML element.
    	
  • wppr_is_review_active
  • 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
    	

    Example

  • wppr_review_change_status
  • 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
    	

    Example

  • wppr_name
  • apply_filters( 'wppr_name', $name, $id, $model )
    	
    where
    	$name: the review title.
    	$id: the ID of the review.
    	$model: instance of WPPR_Review_Model
    	

    Example

  • wppr_name_format
  • 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
    	
  • wppr_price
  • 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
    	
  • wppr_price_raw
  • 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
    	

    Example

  • wppr_currency_code
  • apply_filters( 'wppr_currency_code', $currency )
    	
    where
    	$currency : the currency code to display for the given currency
    	
  • wppr_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
    	
  • wppr_click
  • apply_filters( 'wppr_click', $click, $id, $model )
    	
    where
    	$click: the click behavior
    	$id: the ID of the review.
    	$model: instance of WPPR_Review_Model
    	
  • wppr_images
  • 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
    	
  • wppr_image_format
  • 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
    	
  • wppr_review_image_size
  • 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
    	
  • wppr_thumb
  • 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
    	
  • wppr_rating
  • 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
    	

    Example

  • wppr_pros
  • 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
    	
  • wppr_pros_format
  • 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
    	
  • wppr_cons
  • 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
    	
  • wppr_cons_format
  • 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
    	
  • wppr_options
  • 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
    	
  • wppr_options
  • 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
    	
  • wppr_links
  • apply_filters( 'wppr_links', $links, $id )
    	
    where
    	$links: the array of links in url=>text format.
    	$id: the ID of the review.
    	
  • wppr_links_format
  • 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
    	
  • wppr_content
  • apply_filters( 'wppr_content', $content, $id, $model )
    	
    where
    	$content: the review content
    	$id: the ID of the review.
    	$model: instance of WPPR_Review_Model
    	

    Example

  • wppr_get_old_option
  • apply_filters( 'wppr_get_old_option', $option, $key )
    	
    where
    	$option: the option to use
    	$key: the key corresponding to the option
    	
  • wppr_get_default_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
    	
  • wppr_pre_option_[key]
  • apply_filters( 'wppr_pre_option_[key[', $value )
    	
    where
    	$value: the option to use for the specific option defined by the [key]
    	
  • wppr_global_style
  • apply_filters( 'wppr_global_style', $style)
    	
    where
    	$style: CSS to be added as inline styles
    	
  • wppr_option_name_html
  • apply_filters( 'wppr_option_name_html', $name )
    	
    where
    	$name: the HTML to show for the option name
    	
  • wppr_option_custom_icon
  • apply_filters( 'wppr_option_custom_icon', $icon )
    	
    where
    	$icon: the custom icon to use, empty by default
    	
  • wppr_disable_price_richsnippet
  • apply_filters( 'wppr_disable_price_richsnippet', $value )
    	
    where
    	$value: whether to disable rich snippets or not, false by default
    	
  • wppr_widget_style1_buynow_link
  • 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
    	
  • wppr_widget_style1_readreview_link
  • 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

  • wppr_shortcode_attributes
  • 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
    	
  • wppr_editor_details_before
  • do_action( 'wppr_editor_details_before', $post )
    	
    where
    	$post: the WP_Post object
    	
  • wppr_editor_details_after
  • do_action( 'wppr_editor_details_after', $post )
    	
    where
    	$post: the WP_Post object
    	
  • wppr_editor_options_before
  • do_action( 'wppr_editor_options_before', $post )
    	
    where
    	$post: the WP_Post object
    	
  • wppr_editor_options_after
  • do_action( 'wppr_editor_options_after', $post )
    	
    where
    	$post: the WP_Post object
    	
  • wppr_editor_pros_before
  • do_action( 'wppr_editor_pros_before', $post )
    	
    where
    	$post: the WP_Post object
    	
  • wppr_editor_pros_after
  • do_action( 'wppr_editor_pros_after', $post )
    	
    where
    	$post: the WP_Post object
    	
  • wppr_editor_pros_after
  • do_action( 'wppr_editor_pros_after', $post )
    	
    where
    	$post: the WP_Post object
    	
  • wppr_editor_cons_after
  • do_action( 'wppr_editor_cons_after', $post )
    	
    where
    	$post: the WP_Post object
    	
  • wppr_editor_after
  • do_action( 'wppr_editor_after', $post )
    	
    where
    	$post: the WP_Post object
    	
  • wppr_admin_page_before
  • do_action( 'wppr_admin_page_before' )
    	
  • wppr_admin_page_after
  • do_action( 'wppr_admin_page_after' )
    	
  • wppr_before_save
  • do_action( 'wppr_before_save', $post, $data )
    	
    where
    	$post: the WP_Post object 	$data: the $_POST request
    	
  • wppr_after_save
  • do_action( 'wppr_after_save', $post, $data )
    	
    where
    	$post: the WP_Post object 	$data: the $_POST request
    	
  • wppr_review_deactivate
  • do_action( 'wppr_review_deactivate', $id, $model )
    	
    where
    	$id: the ID of the review 	$model: instance of WPPR_Review_Model
    	
  • wppr_review_activate
  • do_action( 'wppr_review_activate', $id, $model )
    	
    where
    	$id: the ID of the review 	$model: instance of WPPR_Review_Model
    	
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us