WP Related Posts and Products (WRI) 1.2.7 has 61 actions and 143 filters, read directly from its source code on Nov 18, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when WP Related Posts and Products (WRI) fires an action
add_action( 'acf/add_meta_boxes', function( $post_type, $post, $field_groups ) {
// Your code runs here.
}, 10, 3 );
// Change a value WP Related Posts and Products (WRI) is about to use
add_filter( 'acf/fields/user/result', function( $item, $user, $field, $post_id ) {
// Change $item here.
return $item;
}, 10, 4 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filters the result text. */ apply_filters( 'acf/fields/user/result', $item['text'], $user, $field, $post_id ); -
/** * Fires after metaboxes have been added. */ do_action( 'acf/add_meta_boxes', $post_type, $post, $field_groups ); -
/** * Filters the query args. */ apply_filters( 'acf/ajax/query_users/args', $args, $request, $this ); -
/** * Fires when a request is made. */ do_action( 'acf/ajax/query_users/init', $request, $this ); -
/** * Filters the result item. */ apply_filters( 'acf/ajax/query_users/result', $item, $user, $this ); -
/** * Filters the query results. */ apply_filters( 'acf/ajax/query_users/results', $results, $args, $this ); -
/** * Filters the column names to be searched. */ apply_filters( 'acf/ajax/query_users/search_columns', $columns, $search, $WP_User_Query, $this ); -
/** * Filters whether the current user is allowed to save unfiltered HTML. */ apply_filters( 'acf/allow_unfiltered_html', $allow_unfiltered_html ); -
/** * Filters the $field array when it is being cloned. */ apply_filters( 'acf/clone_field', $field, $clone_field ); -
/** * Filters whether or not to connect the attachment. */ apply_filters( 'acf/connect_attachment_to_post', true, $attachment_id, $post_id ); -
/** * Filters the $data array after it has been decoded. */ apply_filters( 'acf/decode_post_id', $data, $post_id ); -
/** * Fires immediately after a field has been deleted. */ do_action( 'acf/delete_field', $field ); -
/** * Fires immediately after a field group has been deleted. */ do_action( 'acf/delete_field_group', $field_group ); -
/** * Fires before a value is deleted. */ do_action( 'acf/delete_value', $post_id, $field['name'], $field ); -
/** * Filters the $field array after it has been duplicated. */ apply_filters( 'acf/duplicate_field', $field ); -
/** * Fires immediately after a field_group has been duplicated. */ do_action( 'acf/duplicate_field_group', $field_group ); -
/** * Filters the $wrapper array before rendering. */ apply_filters( 'acf/field_wrapper_attributes', $wrapper, $field ); -
/** * Filters the query args. */ apply_filters( 'acf/fields/user/query', $args, $query->field, $query->post_id ); -
/** * Filters the column names to be searched. */ apply_filters( 'acf/fields/user/search_columns', $columns, $search, $WP_User_Query, $query->field ); -
/** * Fires within the #acf-form-data element to add extra HTML. */ do_action( 'acf/form_data', $data ); -
/** * Filters the $value for use in a template function. */ apply_filters( 'acf/format_value', $value, $post_id, $field ); -
/** * Filters the cache key. */ apply_filters( 'acf/get_cache_key', $key, $key ); -
/** * Filters the counted number of fields. */ apply_filters( 'acf/get_field_count', count($raw_fields), $parent ); -
/** * Filters the generated CSS styles. */ apply_filters( 'acf/get_field_group_style', $style, $field_group ); -
/** * Filters the field's label HTML. */ apply_filters( 'acf/get_field_label', $label, $field, $context ); -
/** * Filters the determined local. */ apply_filters( 'acf/get_locale', $locale ); -
/** * Filters the $sub_field found. */ apply_filters( 'acf/get_sub_field', $sub_field, $id, $field ); -
/** * Fires immediately after a field_group has been imported. */ do_action( 'acf/import_field_group', $field_group ); -
/** * Fires after field types have been included. */ do_action( 'acf/include_field_types', ACF_MAJOR_VERSION ); -
/** * Fires during initialization. Used to add local fields. */ do_action( 'acf/include_fields', ACF_MAJOR_VERSION ); -
/** * Fires after location types have been included. */ do_action( 'acf/include_location_rules', ACF_MAJOR_VERSION ); -
/** * Fires after ACF is completely "initialized". */ do_action( 'acf/init', ACF_MAJOR_VERSION ); -
/** * Filters the metabox priority. */ apply_filters( 'acf/input/meta_box_priority', $priority, $field_group ); -
/** * Filters whether the $id is a field group key. */ apply_filters( 'acf/is_field_group_key', false, $id ); -
/** * Filters whether the $id is a field key. */ apply_filters( 'acf/is_field_key', false, $id ); -
/** * Filters the $field array after it has been loaded. */ apply_filters( 'acf/load_field', $field ); -
/** * Filters the $field_group array after it has been loaded. */ apply_filters( 'acf/load_field_group', $field_group ); -
/** * Filters the $field_groups array. */ apply_filters( 'acf/load_field_groups', $field_groups ); -
/** * Filters the $fields array. */ apply_filters( 'acf/load_fields', $fields, $parent ); -
/** * Filters the $meta array after it has been loaded. */ apply_filters( 'acf/load_meta', $meta, $post_id ); -
/** * Filters the reference value. */ apply_filters( 'acf/load_reference', $reference, $field_name, $post_id ); -
/** * Filters the $value after it has been loaded. */ apply_filters( 'acf/load_value', $value, $post_id, $field ); -
/** * Filters the $fields array before they are rendered. */ apply_filters( 'acf/pre_render_fields', $fields, $post_id ); -
/** * Filters the $field array. */ apply_filters( 'acf/prepare_field', $field ); -
/** * Filters the $field array before being returned to the export tool. */ apply_filters( 'acf/prepare_field_for_export', $field ); -
/** * Filters the $field array before being returned to the import tool. */ apply_filters( 'acf/prepare_field_for_import', $field ); -
/** * Filters the $field_group array before being returned to the export tool. */ apply_filters( 'acf/prepare_field_group_for_export', $field_group ); -
/** * Filters the $field_group array before being returned to the import tool. */ apply_filters( 'acf/prepare_field_group_for_import', $field_group ); -
/** * Filters the $fields array before being returned to the import tool. */ apply_filters( 'acf/prepare_fields_for_import', $fields ); -
/** * Filters the $value before used in HTML. */ apply_filters( 'acf/preview_value', $value, $post_id, $field ); -
/** * Fires when rendering a field. */ do_action( 'acf/render_field', $field ); -
/** * Fires after fields have been rendered. */ do_action( 'acf/render_fields', $fields, $post_id ); -
/** * Filters the $field array to translate strings. */ apply_filters( 'acf/translate_field', $field ); -
/** * Filters the $field group array to translate strings. */ apply_filters( 'acf/translate_field_group', $field_group ); -
/** * Fires immediately after a field has been trashed. */ do_action( 'acf/trash_field', $field ); -
/** * Fires immediately after a field_group has been trashed. */ do_action( 'acf/trash_field_group', $field_group ); -
/** * Fires immediately after a field has been trashed. */ do_action( 'acf/untrash_field', $field ); -
/** * Fires immediately after a field_group has been trashed. */ do_action( 'acf/untrash_field_group', $field_group ); -
/** * Filters the $field array before it is updated. */ apply_filters( 'acf/update_field', $field ); -
/** * Fires immediately after a field group has been updated. */ do_action( 'acf/update_field_group', $field_group ); -
/** * Filters the $value before it is updated. */ apply_filters( 'acf/update_value', $value, $post_id, $field, $value ); -
/** * Fires after a field has been updated, and the field cache has been cleaned. */ do_action( 'acf/updated_field', $field ); -
/** * Filters the errors for a file before it is uploaded to WordPress. */ apply_filters( "acf/upload_prefilter/type={$field['type']}", $errors, $file, $field ); -
/** * Filters the errors for a file before it is uploaded or displayed in the * media modal. */ apply_filters( "acf/validate_attachment/type={$field['type']}", $errors, $file, $attachment, $field, $context ); -
/** * Filters the $field array to validate settings. */ apply_filters( 'acf/validate_field', $field ); -
/** * Filters the $field_group array to validate settings. */ apply_filters( 'acf/validate_field_group', $field_group ); -
/** * Filters whether the value is valid. */ apply_filters( "acf/validate_value/type={$field['type']}", $valid, $value, $field, $input ); -
/** * Filters the locale for the current request. */ apply_filters( 'determine_locale', $determined_locale ); -
/** * Filters a plugin's locale. */ apply_filters( 'plugin_locale', acf_get_locale(), $domain ); -
/** * Filters the locale for the current request prior to the default * determination process. */ apply_filters( 'pre_determine_locale', null ); -
/** * This action is documented in wp-admin/custom-header.php */ do_action( 'wp_create_file_in_uploads', $file, $id ); -
do_action( "acf/render_field_settings/type={$field['type']}", $field ); -
apply_filters( 'default_page_template_title', __('Default Template', 'acf') ); -
apply_filters( 'loop_shop_columns', 4 ); -
apply_filters_ref_array( "{$filter}/{$variation}={$value}", $args ); -
do_action_ref_array( "{$filter}/{$variation}={$value}", $args ); -
apply_filters( 'acf_the_content', $value ); -
apply_filters( 'acf_the_editor_content', $field['value'], $default_editor ); -
do_action( 'acf/admin_enqueue_scripts' ); -
do_action( 'acf/admin_head' ); -
do_action( 'acf/admin_print_scripts' ); -
apply_filters( "acf/compatibility/{$name}", false ); -
do_action( 'acf/enqueue_scripts' ); -
do_action( 'acf/enqueue_uploader' ); -
do_action( 'acf/field_group/admin_enqueue_scripts' ); -
do_action( 'acf/field_group/admin_head' ); -
apply_filters( 'acf/field_group/admin_l10n', $l10n ); -
do_action( 'acf/field_group/form_data', $args ); -
apply_filters( 'acf/fields/google_map/api', $api ); -
apply_filters( 'acf/fields/page_link/query', $args, $field, $options['post_id'] ); -
apply_filters( "acf/fields/page_link/query/key={$field['key']}", $args, $field, $options['post_id'] ); -
apply_filters( "acf/fields/page_link/query/name={$field['name']}", $args, $field, $options['post_id'] ); -
apply_filters( 'acf/fields/page_link/result', $title, $post, $field, $post_id ); -
apply_filters( "acf/fields/page_link/result/key={$field['key']}", $title, $post, $field, $post_id ); -
apply_filters( "acf/fields/page_link/result/name={$field['_name']}", $title, $post, $field, $post_id ); -
apply_filters( 'acf/fields/post_object/query', $args, $field, $options['post_id'] ); -
apply_filters( "acf/fields/post_object/query/key={$field['key']}", $args, $field, $options['post_id'] ); -
apply_filters( "acf/fields/post_object/query/name={$field['name']}", $args, $field, $options['post_id'] ); -
apply_filters( 'acf/fields/post_object/result', $title, $post, $field, $post_id ); -
apply_filters( "acf/fields/post_object/result/key={$field['key']}", $title, $post, $field, $post_id ); -
apply_filters( "acf/fields/post_object/result/name={$field['_name']}", $title, $post, $field, $post_id ); -
apply_filters( 'acf/fields/relationship/query', $args, $field, $options['post_id'] ); -
apply_filters( "acf/fields/relationship/query/key={$field['key']}", $args, $field, $options['post_id'] ); -
apply_filters( "acf/fields/relationship/query/name={$field['name']}", $args, $field, $options['post_id'] ); -
apply_filters( 'acf/fields/relationship/result', $title, $post, $field, $post_id ); -
apply_filters( "acf/fields/relationship/result/key={$field['key']}", $title, $post, $field, $post_id ); -
apply_filters( "acf/fields/relationship/result/name={$field['_name']}", $title, $post, $field, $post_id ); -
apply_filters( 'acf/fields/taxonomy/query', $args, $field, $options['post_id'] ); -
apply_filters( "acf/fields/taxonomy/query/key={$field['key']}", $args, $field, $options['post_id'] ); -
apply_filters( "acf/fields/taxonomy/query/name={$field['name']}", $args, $field, $options['post_id'] ); -
apply_filters( 'acf/fields/taxonomy/result', $title, $term, $field, $post_id ); -
apply_filters( "acf/fields/taxonomy/result/key={$field['key']}", $title, $term, $field, $post_id ); -
apply_filters( "acf/fields/taxonomy/result/name={$field['_name']}", $title, $term, $field, $post_id ); -
apply_filters( 'acf/fields/taxonomy/wp_list_categories', $args, $field ); -
apply_filters( "acf/fields/taxonomy/wp_list_categories/key={$field['key']}", $args, $field ); -
apply_filters( "acf/fields/taxonomy/wp_list_categories/name={$field['_name']}", $args, $field ); -
apply_filters( 'acf/fields/wysiwyg/toolbars', $toolbars ); -
apply_filters( 'acf/get_field_types', $groups ); -
apply_filters( 'acf/get_image_sizes', $sizes ); -
apply_filters( 'acf/get_post_id_info', $info, $post_id ); -
apply_filters( 'acf/get_post_types', $post_types, $args ); -
apply_filters( 'acf/get_taxonomies', $taxonomies, $args ); -
do_action( 'acf/include_admin_tools' ); -
do_action( 'acf/input/admin_enqueue_scripts' ); -
do_action( 'acf/input/admin_head' ); -
apply_filters( 'acf/input/admin_l10n', array() ); -
do_action( 'acf/input/form_data', $data ); -
apply_filters( 'acf/location/match_rule', $result, $rule, $screen, $field_group ); -
apply_filters( "acf/location/match_rule/type={$rule['param']}", $result, $rule, $screen, $field_group ); -
apply_filters( 'acf/location/rule_match', $result, $rule, $screen, $field_group ); -
apply_filters( "acf/location/rule_match/{$rule['param']}", $result, $rule, $screen, $field_group ); -
apply_filters( 'acf/location/rule_operators', $operators, $rule ); -
apply_filters( "acf/location/rule_operators/{$rule['param']}", $operators, $rule ); -
apply_filters( "acf/location/rule_operators/type={$rule['param']}", $operators, $rule ); -
apply_filters( 'acf/location/rule_types', $groups ); -
apply_filters( 'acf/location/rule_values', $values, $rule ); -
apply_filters( "acf/location/rule_values/{$rule['param']}", $values, $rule ); -
apply_filters( "acf/location/rule_values/type={$rule['param']}", $values, $rule ); -
apply_filters( 'acf/location/screen', $screen, $field_group ); -
apply_filters( 'acf/location/validate_rule', $rule ); -
apply_filters( "acf/location/validate_rule/type={$rule['param']}", $rule ); -
apply_filters( 'acf/pre_delete_metadata', null, $post_id, $name, $hidden ); -
apply_filters( 'acf/pre_format_value', null, $value, $post_id, $field ); -
apply_filters( 'acf/pre_load_meta', null, $post_id ); -
apply_filters( 'acf/pre_load_metadata', null, $post_id, $name, $hidden ); -
apply_filters( 'acf/pre_load_post_id', null, $post_id ); -
apply_filters( 'acf/pre_load_reference', null, $field_name, $post_id ); -
apply_filters( 'acf/pre_load_value', null, $post_id, $field ); -
apply_filters( 'acf/pre_save_post', $post_id, $form ); -
apply_filters( 'acf/pre_submit_form', $form ); -
apply_filters( 'acf/pre_update_metadata', null, $post_id, $name, $value, $hidden ); -
apply_filters( 'acf/pre_update_value', null, $value, $post_id, $field ); -
do_action( 'acf/register_scripts', $version, $min ); -
do_action( 'acf/render_field_group_settings', $field_group ); -
do_action( 'acf/render_field_settings', $field ); -
do_action( 'acf/save_post', $post_id ); -
apply_filters( "acf/settings/{$name}", $value ); -
do_action( 'acf/submit_form', $form, $post_id ); -
do_action( 'acf/update_500_field', $field ); -
do_action( 'acf/upgrade_500' ); -
do_action( 'acf/upgrade_500_field_group', $nfg, $ofg ); -
do_action( 'acf/upgrade_550' ); -
do_action( 'acf/upgrade_550_taxonomy', $taxonomy ); -
do_action( 'acf/upgrade_550_taxonomy_term', $term_id ); -
do_action( 'acf/upgrade_550_termmeta' ); -
apply_filters( 'acf/upload_prefilter', $errors, $file, $field ); -
apply_filters( "acf/upload_prefilter/key={$field['key']}", $errors, $file, $field ); -
apply_filters( "acf/upload_prefilter/name={$field['_name']}", $errors, $file, $field ); -
apply_filters( 'acf/validate_attachment', $errors, $file, $attachment, $field, $context ); -
apply_filters( "acf/validate_attachment/key={$field['key']}", $errors, $file, $attachment, $field, $context ); -
apply_filters( "acf/validate_attachment/name={$field['_name']}", $errors, $file, $attachment, $field, $context ); -
apply_filters( 'acf/validate_form', $args ); -
apply_filters( 'acf/validate_post_id', $post_id, $_post_id ); -
do_action( 'acf/validate_save_post' ); -
apply_filters( 'acf/validate_setting', $name ); -
apply_filters( 'acf/validate_value', $valid, $value, $field, $input ); -
apply_filters( "acf/validate_value/key={$field['key']}", $valid, $value, $field, $input ); -
apply_filters( "acf/validate_value/name={$field['_name']}", $valid, $value, $field, $input ); -
do_action( 'acf/verify_ajax' ); -
apply_filters( 'mce_buttons', $mce_buttons, $editor_id ); -
apply_filters( 'mce_buttons_2', $mce_buttons_2, $editor_id ); -
apply_filters( 'mce_buttons_3', array(), $editor_id ); -
apply_filters( 'mce_buttons_4', array(), $editor_id ); -
do_action( 'media_buttons', $id ); -
apply_filters( 'teeny_mce_buttons', $teeny_mce_buttons, $editor_id ); -
apply_filters( 'widget_title', $title ); -
do_action( 'woocommerce_after_shop_loop' ); -
do_action( 'woocommerce_before_shop_loop' ); -
apply_filters( 'wri_choose_template', '', $placement, $position, $widget_instance, $related_option, $reference2related_option ); -
apply_filters( 'wri_content_clear_end', '</div>' ); -
apply_filters( 'wri_content_clear_start', '<div class="wri_content_clear_both">' ); -
do_action( 'wri_init' ); -
do_action( 'wri_intagration_init' ); -
apply_filters( 'wri_supported_post_types', $ret ); -
apply_filters( 'wri_template_url', 'wri/' ); -
apply_filters( 'wri_used_post_types', $ret ); -
do_action( 'wsl_display_plugin_activation_settings_page_link' );
Generated from WP Related Posts and Products (WRI)'s GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: