Every action and filter hook exposed by Plugixa Testimonial, grouped by area. Action hooks fire for side effects; filter hooks let you modify data.
Table of contents
- Plugin lifecycle
- Testimonial CRUD hooks
- Category CRUD hooks
- View & Shortcode CRUD hooks
- Shortcode & rendering hooks
- Template system hooks
- Settings hooks
- Submission & email hooks
- Testimonial Request hooks
- Social Proof hooks
- Multilingual hooks
- AI generator hooks PRO
- Google Reviews hooks PRO
- Custom Field hooks PRO
- Import / Export hooks PRO
- WooCommerce hooks
- Elementor hooks
- License / Freemius hooks
- REST API endpoints
- Theme override guide
- Code examples
Plugin lifecycle
| Hook |
Type |
Fires |
pt_fs_pxf_loaded |
action |
After Freemius SDK initialization. |
plugixatestimonial_loaded |
action |
After the main Plugin class is instantiated. |
plugixatestimonial_init |
action |
After all plugin hooks are registered. |
plugixatestimonial_activated |
action |
On plugin activation. |
plugixatestimonial_deactivated |
action |
On plugin deactivation. |
Testimonial CRUD hooks
Before / after create
do_action( 'plugixatestimonial_before_create_testimonial', $data );
do_action( 'plugixatestimonial_after_create_testimonial', $testimonial_id, $data );
Before / after update
do_action( 'plugixatestimonial_before_update_testimonial', $testimonial_id, $data );
do_action( 'plugixatestimonial_after_update_testimonial', $testimonial_id, $data, $previous_data );
Before / after delete
do_action( 'plugixatestimonial_before_delete_testimonial', $testimonial_id );
do_action( 'plugixatestimonial_after_delete_testimonial', $testimonial_id, $data );
Status changes
do_action( 'plugixatestimonial_status_changed', $testimonial_id, $new_status, $old_status );
Bulk operations
do_action( 'plugixatestimonial_before_bulk_delete_testimonials', $ids );
do_action( 'plugixatestimonial_after_bulk_delete_testimonials', $ids, $count );
do_action( 'plugixatestimonial_after_reorder_testimonials', $items, $category_id );
Filters
| Filter |
Receives |
Returns |
plugixatestimonial_get_testimonials |
array $testimonials, array $args |
Modified list. |
plugixatestimonial_get_testimonial |
array $testimonial, int $id |
Modified single testimonial. |
plugixatestimonial_testimonial_data |
array $data, string $operation |
Sanitized data before create/update. |
plugixatestimonial_testimonial_display |
array $data, int $id |
Modify display data before rendering. |
plugixatestimonial_testimonial_text |
string $text, int $id |
Modify testimonial text before render. |
Category CRUD hooks
Before / after create
do_action( 'plugixatestimonial_before_create_category', $data );
do_action( 'plugixatestimonial_after_create_category', $category_id, $data );
Before / after update
do_action( 'plugixatestimonial_before_update_category', $category_id, $data );
do_action( 'plugixatestimonial_after_update_category', $category_id, $data );
Before / after delete
do_action( 'plugixatestimonial_before_delete_category', $category_id );
do_action( 'plugixatestimonial_after_delete_category', $category_id );
Reorder
do_action( 'plugixatestimonial_after_reorder_categories', $items );
Filters
| Filter |
Receives |
Returns |
plugixatestimonial_get_categories |
array $cats, array $args |
Modified list. |
plugixatestimonial_get_category |
array $cat, int $id |
Modified single category. |
plugixatestimonial_category_data |
array $data, string $operation |
Before save. |
View & Shortcode CRUD hooks
View
do_action( 'plugixatestimonial_before_create_view', $data );
do_action( 'plugixatestimonial_after_create_view', $view_id, $data );
do_action( 'plugixatestimonial_before_update_view', $view_id, $data );
do_action( 'plugixatestimonial_after_update_view', $view_id, $data );
do_action( 'plugixatestimonial_before_delete_view', $view_id );
do_action( 'plugixatestimonial_after_delete_view', $view_id );
do_action( 'plugixatestimonial_after_set_default_view', $view_id );
Shortcode
do_action( 'plugixatestimonial_before_create_shortcode', $data );
do_action( 'plugixatestimonial_after_create_shortcode', $shortcode_id, $data );
do_action( 'plugixatestimonial_before_update_shortcode', $shortcode_id, $data );
do_action( 'plugixatestimonial_after_update_shortcode', $shortcode_id, $data );
do_action( 'plugixatestimonial_before_delete_shortcode', $shortcode_id );
do_action( 'plugixatestimonial_after_delete_shortcode', $shortcode_id );
Filters
| Filter |
Receives |
Returns |
plugixatestimonial_view_config_defaults |
array $config |
Default view config. |
plugixatestimonial_free_views_limit |
int $limit |
Override the free tier limit (default 2). |
Shortcode & rendering hooks
Attributes
$atts = apply_filters( 'plugixatestimonial_shortcode_atts', $atts, $defaults );
Before / after render
do_action( 'plugixatestimonial_before_render', $atts, $instance_id, $settings, $testimonials );
do_action( 'plugixatestimonial_after_render', $atts, $instance_id, $output );
CSS variables
$vars = apply_filters( 'plugixatestimonial_css_vars', $vars, $settings );
Per-item HTML
$html = apply_filters(
'plugixatestimonial_rendered_testimonial_item',
$html, // string
$testimonial, // array
$settings, // array
$index // int
);
Final output
$output = apply_filters(
'plugixatestimonial_shortcode_output',
$output,
$atts,
$instance_id,
$settings
);
Scripts & styles
do_action( 'plugixatestimonial_enqueue_scripts', $instance_id, $settings );
$script_data = apply_filters( 'plugixatestimonial_localize_script_data', $data, $settings, $instance_id );
Swiper config
$config = apply_filters( 'plugixatestimonial_swiper_config', $config, $view_config, $atts );
Template system hooks
Plugixa Testimonial uses a WooCommerce-style template loader with theme override support.
Filters
| Filter |
Receives |
Returns |
plugixatestimonial_template_path |
string $located, string $template, string $template_name |
Resolved template path. |
plugixatestimonial_template_vars |
array $vars, string $template |
Vars extracted before render. |
Actions
do_action( 'plugixatestimonial_before_template', $template, $path, $vars );
do_action( 'plugixatestimonial_after_template', $template, $path, $vars );
Template search order
{child-theme}/plugixa-testimonial/{template}.php
{parent-theme}/plugixa-testimonial/{template}.php
{plugin}/pro/templates/frontend/{template}.php (if pro/ exists)
{plugin}/templates/{template}.php
Settings hooks
| Hook |
Type |
Purpose |
plugixatestimonial_settings_defaults |
filter |
Modify default values before merging with saved. |
plugixatestimonial_get_settings |
filter |
Modify settings on read. |
plugixatestimonial_sanitize_settings |
filter |
Modify settings before save ($settings, $input, $current). |
plugixatestimonial_validate_settings |
filter |
Return validation errors ($errors, $settings). |
plugixatestimonial_before_save_settings |
action |
Before update_option ($settings, $current). |
plugixatestimonial_after_save_settings |
action |
After save. |
Submission & email hooks
Frontend submission
do_action( 'plugixatestimonial_form_submitted', $testimonial_id, $submission_data );
$fields = apply_filters( 'plugixatestimonial_form_fields', $fields );
$errors = apply_filters( 'plugixatestimonial_form_validation', $errors, $data );
Admin notification emails
| Hook |
Type |
Purpose |
plugixatestimonial_notification_enabled |
filter |
Override the enabled state per-submission. |
plugixatestimonial_notification_recipients |
filter |
Modify recipient email list. |
plugixatestimonial_notification_subject |
filter |
Modify subject template. |
plugixatestimonial_notification_message |
filter |
Modify body template. |
plugixatestimonial_notification_headers |
filter |
Modify email headers (e.g., add Reply-To). |
plugixatestimonial_before_send_notification |
action |
Before the email dispatch. |
plugixatestimonial_after_send_notification |
action |
After successful dispatch. |
Testimonial Request hooks
| Hook |
Type |
Purpose |
plugixatestimonial_before_send_request |
action |
Before the email dispatch. Args: $request_row. |
plugixatestimonial_after_send_request |
action |
After successful dispatch. |
plugixatestimonial_request_email_subject |
filter |
Modify subject. |
plugixatestimonial_request_email_body |
filter |
Modify body HTML. |
plugixatestimonial_request_email_headers |
filter |
Modify headers. |
plugixatestimonial_request_token_expiry_days |
filter |
Override the 30-day default per-request. |
plugixatestimonial_request_submitted |
action |
Fires after a valid token consumes a form submission. |
Social Proof hooks
| Hook |
Type |
Purpose |
plugixatestimonial_social_proof_enabled |
filter |
Override the enabled state. |
plugixatestimonial_social_proof_query_args |
filter |
Modify the REST query args. |
plugixatestimonial_social_proof_testimonials |
filter |
Modify the returned testimonials array. |
plugixatestimonial_social_proof_popup_html |
filter |
Customize the rendered popup HTML (JS-side, via pxtSocialProof hooks). |
Multilingual hooks
| Hook |
Type |
Purpose |
plugixatestimonial_multilingual_active |
filter |
Override auto-detection (return bool). |
plugixatestimonial_current_language |
filter |
Override the detected current language. |
plugixatestimonial_available_languages |
filter |
Modify the languages array. |
plugixatestimonial_language_where |
filter |
Modify the WHERE clause fragment. |
plugixatestimonial_before_link_translations |
action |
Before linking two items. |
plugixatestimonial_after_link_translations |
action |
After linking. |
AI generator hooks PRO
| Hook |
Type |
Purpose |
plugixatestimonial_before_ai_generate |
action |
Before a generation request ($topic, $provider, $count). |
plugixatestimonial_after_ai_generate |
action |
After a successful generation ($testimonials, $topic, $provider). |
plugixatestimonial_ai_generated_testimonial |
filter |
Modify a single generated item. |
plugixatestimonial_ai_generated_testimonials |
filter |
Modify the whole batch. |
plugixatestimonial_ai_provider_config |
filter |
Override provider settings at runtime. |
plugixatestimonial_ai_prompt |
filter |
Modify the prompt sent to the AI. |
plugixatestimonial_ai_max_file_size |
filter |
Override the default 5 MB PDF/doc upload size limit. |
Google Reviews hooks PRO
| Hook |
Type |
Purpose |
plugixatestimonial_google_review_before_import |
action |
Before each review is imported. Args: $review_data. |
plugixatestimonial_google_review_after_import |
action |
After each review is imported. Args: $testimonial_id, $review_data. |
plugixatestimonial_google_review_data |
filter |
Modify the testimonial payload before insert. |
plugixatestimonial_google_review_skip_duplicate |
filter |
Override duplicate detection. |
Custom Field hooks PRO
| Hook |
Type |
Purpose |
plugixatestimonial_custom_field_value |
filter |
Modify a value on read ($value, $testimonial_id, $field_key). |
plugixatestimonial_before_save_custom_field |
action |
Before a value is saved. |
plugixatestimonial_after_save_custom_field |
action |
After a value is saved. |
plugixatestimonial_custom_field_types |
filter |
Register new field types. |
plugixatestimonial_custom_fields_frontend |
filter |
Override which fields appear on the submission form. |
Import / Export hooks PRO
| Hook |
Type |
Purpose |
plugixatestimonial_export_data |
filter |
Modify the payload before serialization. |
plugixatestimonial_import_row |
filter |
Modify each row before insert/update. |
plugixatestimonial_before_import |
action |
Before the batch starts. |
plugixatestimonial_after_import |
action |
After the batch completes ($stats). |
plugixatestimonial_import_conflict |
filter |
Override conflict resolution per row. |
WooCommerce hooks
| Hook |
Type |
Purpose |
plugixa_testimonial_product_tab_title |
filter |
Customize tab title per-product ($title, $product_id). |
plugixa_testimonial_product_tab_priority |
filter |
Change tab position ($priority, $product_id). |
plugixa_testimonial_product_tab_content |
filter |
Modify rendered tab content ($content, $product_id, $atts). |
Elementor hooks
| Hook |
Type |
Purpose |
plugixatestimonial_elementor_widget_controls |
action |
Register additional widget controls. |
plugixatestimonial_elementor_widget_settings |
filter |
Modify widget settings. |
plugixatestimonial_elementor_widget_render |
filter |
Customize rendered output. |
License / Freemius hooks
| Hook |
Type |
Purpose |
plugixatestimonial_is_pro |
filter |
Override the Pro gate (for testing). |
plugixatestimonial_pro_features |
filter |
Modify the list of gated features. |
plugixatestimonial_show_pro_upsells |
filter |
Hide “locked” pro teasers (true/false). |
plugixatestimonial_upgrade_url |
filter |
Customize the upgrade URL shown in 403 responses and UI cards. |
REST API endpoints
All endpoints are under plugixatestimonial/v1. Authenticated endpoints require a valid WP nonce or application password.
Testimonials
| Method |
Endpoint |
Auth |
| GET |
/testimonials |
edit_posts |
| POST |
/testimonials |
edit_posts |
| GET |
/testimonials/{id} |
edit_posts |
| PUT |
/testimonials/{id} |
edit_posts |
| DELETE |
/testimonials/{id} |
edit_posts |
| PATCH |
/testimonials/{id}/status |
edit_posts |
| POST |
/testimonials/reorder |
edit_posts |
| DELETE |
/testimonials/bulk |
edit_posts |
| POST |
/testimonials/bulk-action |
edit_posts |
| GET |
/testimonials/authors |
edit_posts |
Categories, Views, Shortcodes
| Method |
Endpoint |
Auth |
| GET / POST / PUT / DELETE |
/categories[/{id}] |
edit_posts |
| POST |
/categories/reorder |
edit_posts |
| GET / POST / PUT / DELETE |
/views[/{id}] |
edit_posts |
| DELETE |
/views/bulk |
edit_posts |
| POST |
/views/{id}/duplicate |
edit_posts |
| POST |
/views/{id}/set-default |
edit_posts |
| GET |
/views/default-config |
edit_posts |
| GET / POST / PUT / DELETE |
/shortcodes[/{id}] |
edit_posts |
| DELETE |
/shortcodes/bulk |
edit_posts |
| POST |
/shortcodes/{id}/duplicate |
edit_posts |
Settings
| Method |
Endpoint |
Auth |
| GET |
/settings |
manage_options |
| POST |
/settings |
manage_options |
| GET |
/settings/dashboard |
edit_posts |
| POST |
/settings/demo-data PRO |
manage_options |
| DELETE |
/settings/demo-data PRO |
manage_options |
Custom Fields PRO
| Method |
Endpoint |
Auth |
| GET / POST / PUT / DELETE |
/custom-fields[/{id}] |
manage_options |
| POST |
/custom-fields/reorder |
manage_options |
AI Generator PRO
| Method |
Endpoint |
Auth |
| POST |
/ai-generator/generate-testimonial |
manage_options |
| POST |
/ai-generator/generate-testimonials |
manage_options |
| POST |
/ai-generator/generate-from-url |
manage_options |
| POST |
/ai-generator/generate-from-file |
manage_options |
| POST |
/ai-generator/generate-category |
manage_options |
| POST |
/ai-generator/regenerate-name |
manage_options |
| POST |
/ai-generator/regenerate-content |
manage_options |
| POST |
/ai-generator/suggest-category |
manage_options |
| POST |
/ai-generator/bulk-import |
manage_options |
| POST |
/ai-generator/test-connection |
manage_options |
| GET |
/ai-generator/models |
manage_options |
| POST |
/ai-generator/load-models |
manage_options |
Google Reviews PRO
| Method |
Endpoint |
Auth |
| GET |
/google-reviews/search |
manage_options |
| GET |
/google-reviews/reviews |
manage_options |
| POST |
/google-reviews/import |
manage_options |
| POST |
/google-reviews/test |
manage_options |
Requests
| Method |
Endpoint |
Auth |
| GET |
/requests |
edit_posts |
| POST |
/requests |
edit_posts |
| GET |
/requests/{id} |
edit_posts |
| DELETE |
/requests/{id} |
edit_posts |
| POST |
/requests/{id}/resend |
edit_posts |
| POST |
/requests/bulk |
edit_posts |
| DELETE |
/requests/bulk-delete |
edit_posts |
| GET |
/requests/validate-token |
public |
Multilingual
| Method |
Endpoint |
Auth |
| GET |
/multilingual/languages |
edit_posts |
| GET |
/multilingual/status |
edit_posts |
| GET |
/multilingual/{entity}/{id}/translations |
edit_posts |
| POST |
/multilingual/{entity}/{id}/translations |
edit_posts |
| PUT |
/multilingual/{entity}/link-translations |
edit_posts |
| DELETE |
/multilingual/{entity}/{id}/translations/{lang} |
edit_posts |
Other
| Method |
Endpoint |
Auth |
| GET |
/google-fonts |
manage_options |
| GET |
/woocommerce/products |
edit_posts (conditional on WC active) |
| GET |
/woocommerce/categories |
edit_posts (conditional on WC active) |
Frontend (Public)
| Method |
Endpoint |
Description |
| GET |
/frontend/testimonials |
Approved testimonials filtered by language. |
| GET |
/frontend/testimonials/page |
Paginated HTML for AJAX pagination. |
| POST |
/frontend/submit |
Submit testimonial form (supports custom fields, photo upload, multilingual, token). |
| GET |
/frontend/social-proof |
Recent testimonials for social-proof popups. |
Theme override guide
To override a plugin template from your theme:
- Identify the template you want to override. Files live under
templates/ in the plugin.
- Create the same path under your theme:
{your-theme}/plugixa-testimonial/{template}.php.
- Copy the plugin’s file into that path as a starting point.
- Edit.
Overridable templates
grid.php — grid layout card render.
slider.php — Swiper slider card render.
masonry.php — masonry layout card render.
list.php — vertical list card render.
submission-form.php — frontend submission form.
Example
my-theme/
└── plugixa-testimonial/
├── grid.php ← override only this
└── submission-form.php ← and this
Any template you don’t override falls through to the plugin’s default. You can update the plugin freely — only the files you customized need re-review.
Code examples
Log every testimonial creation
add_action( 'plugixatestimonial_after_create_testimonial', function( $id, $data ) {
error_log( "Testimonial created: #{$id} — {$data['client_name']}" );
}, 10, 2 );
Auto-approve testimonials with 5-star rating from email
add_filter( 'plugixatestimonial_testimonial_data', function( $data, $operation ) {
if ( $operation === 'create' && ! empty( $data['source'] ) && $data['source'] === 'form' ) {
if ( ! empty( $data['rating'] ) && (int) $data['rating'] === 5 ) {
$data['status'] = 'approved';
}
}
return $data;
}, 10, 2 );
Notify Slack on status changes
add_action( 'plugixatestimonial_status_changed', function( $id, $new, $old ) {
if ( $new === 'approved' ) {
wp_remote_post( 'https://hooks.slack.com/services/...', [
'body' => json_encode( [ 'text' => "Testimonial #{$id} approved" ] ),
'headers' => [ 'Content-Type' => 'application/json' ],
] );
}
}, 10, 3 );
Translate all generated testimonials through a proofreader
add_filter( 'plugixatestimonial_ai_generated_testimonials', function( $testimonials ) {
foreach ( $testimonials as &$testimonial ) {
$testimonial['testimonial_text'] = your_proofreader_function( $testimonial['testimonial_text'] );
}
return $testimonials;
} );
Override the free views limit
add_filter( 'plugixatestimonial_free_views_limit', function() {
return 5; // Free users get 5 views instead of 2
} );
Add a verified badge to imported Google reviews
add_filter( 'plugixatestimonial_google_review_data', function( $data, $review ) {
$data['client_company'] .= ' ✓ Verified on Google';
return $data;
}, 10, 2 );
Disable the plugin’s Pro upsell banners
add_filter( 'plugixatestimonial_show_pro_upsells', '__return_false' );
Add a custom WooCommerce tab priority per product category
add_filter( 'plugixa_testimonial_product_tab_priority', function( $priority, $product_id ) {
if ( has_term( 'featured', 'product_cat', $product_id ) ) {
return 5; // very early
}
return $priority;
}, 10, 2 );
Auto-assign a category to all submissions
add_action( 'plugixatestimonial_form_submitted', function( $id, $data ) {
global $wpdb;
$wpdb->insert(
$wpdb->prefix . 'plugixatestimonial_testimonial_categories',
[ 'testimonial_id' => $id, 'category_id' => 7, 'display_order' => 0 ]
);
}, 10, 2 );
Filter testimonials by current user’s company in a shortcode
add_filter( 'plugixatestimonial_get_testimonials', function( $testimonials, $args ) {
if ( ! is_user_logged_in() ) {
return $testimonials;
}
$user_company = get_user_meta( get_current_user_id(), 'company', true );
if ( empty( $user_company ) ) {
return $testimonials;
}
return array_filter( $testimonials, function( $t ) use ( $user_company ) {
return stripos( $t['client_company'], $user_company ) !== false;
} );
}, 10, 2 );