StoreAgent 1.2.3 has 38 actions and 98 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 StoreAgent fires an action
add_action( 'woocommerce_email_footer', function( $arg1 ) {
// Your code runs here.
}, 10, 1 );
// Change a value StoreAgent is about to use
add_filter( 'saai_allow_immediate_queue_run', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );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
-
/** * This filter is documented in includes/Classes/Memory/Data_Upload.php */ apply_filters( 'saai_allow_immediate_queue_run', true ); -
/** * Defensive ceiling on the per-fetch row count so a pathological store can't * stall the dashboard endpoint. */ apply_filters( 'saai_dashboard_stats_max_orders', 10000 ); -
/** * Output the email header. */ do_action( 'woocommerce_email_header', $email_heading, null ); -
/** * Fires after a bulk-archive operation completes. */ do_action( 'saai_after_notifications_bulk_archive', $to_archive, $skipped, $archived ); -
/** * Filter the sample-run agent map (feed ID => key + bulk value). */ apply_filters( 'saai_agent_sample_map', array( 'product-description-ai' => array( 'key' => self::AGENT_DESCRIPTION, 'bulk' => 'product-description-ai', ), 'product-summaries-ai' => array( 'key' => self::AGENT_SUMMARIES, 'bulk' => 'product-summaries-ai', ), 'product-tags-generator-ai' => array( 'key' => self::AGENT_TAGS, 'bulk' => 'product-tags-generator-ai', ), 'image-alt-tags-ai' => array( 'key' => self::AGENT_IMAGE_ALT, 'bulk' => n... ); -
/** * Fires after a successful AI action is recorded locally. */ do_action( 'saai_ai_action_performed', $count, $context ); -
/** * Filter chat settings before returning to AI. */ apply_filters( 'saai_ai_chat_settings', $chat_settings ); -
/** * Filters the product_visibility term slugs excluded from AI memory * upload/indexing. A product must carry EVERY configured slug's term to be * excluded (a conjunction) - the default pair together mean "Hidden". */ apply_filters( 'saai_ai_memory_excluded_visibility_terms', array( 'exclude-from-catalog', 'exclude-from-search' ), $post_type ); -
/** * Fires before a bulk-archive operation runs. */ do_action( 'saai_before_notifications_bulk_archive', $to_archive, $skipped ); -
/** * Filter whether chat response citations are enabled (storeagent-chat #37). */ apply_filters( 'saai_chat_citations_enabled', ! empty( $widget_settings['show_response_citations'] ) ); -
/** * Filter the login URL served to the AI backend with the chat settings. */ apply_filters( 'saai_chat_login_url', $login_url ); -
/** * Filter how many days a session stays in the shopper session map. */ apply_filters( 'saai_chat_privacy_map_days', 32 ); -
/** * Filter the lifetime of a chat session token binding. */ apply_filters( 'saai_chat_session_token_ttl', 7 * DAY_IN_SECONDS ); -
/** * Filter whether a signed-out caller may read a session bound to an account. */ apply_filters( 'saai_chat_session_verify_signed_out_caller', false, $session_id, $bound_user_id ); -
/** * Filter whether the chat subscription lookup is enabled. */ apply_filters( 'saai_chat_subscriptions_available', true ); -
/** * Filter the coupon description data before it is sent to the AI agent. */ apply_filters( 'saai_coupon_description_data', $data, $coupon ); -
/** * Fires when a data-upload run has drained the whole enabled catalogue. */ do_action( 'saai_ingestion_completed', $post_type ); -
/** * Filter the maximum number of items in a single AI-memory batch upload * request. */ apply_filters( 'saai_memory_upload_batch_max', self::MEMORY_UPLOAD_BATCH_MAX ); -
/** * Filter the maximum encoded byte size of a single AI-memory batch upload * request body. A single item larger than this is still sent on its own. */ apply_filters( 'saai_memory_upload_batch_max_bytes', self::MEMORY_UPLOAD_BATCH_MAX_BYTES ); -
/** * Filter whether a tracked custom field change re-syncs the post to AI memory. */ apply_filters( 'saai_meta_change_resync_enabled', true, $post_id, $meta_key ); -
/** * Fires when a notification's action link is reported as clicked. */ do_action( 'saai_notification_action_clicked', $id, $action ); -
/** * Filter order data for third-party plugin support. */ apply_filters( 'saai_order_data', $order_data, $order ); -
/** * Filters how long to wait before retrying a failed plan-data fetch. */ apply_filters( 'saai_plan_fetch_retry_delay_seconds', self::PLAN_FETCH_RETRY_DELAY_SECONDS ); -
/** * Fires after freshly fetched subscription plan data has been stored. */ do_action( 'saai_plans_data_refreshed' ); -
/** * Filter the number of posts per delete batch. */ apply_filters( 'saai_posts_delete_per_batch', self::POSTS_DELETE_PER_BATCH ); -
/** * Filter the number of posts per upload batch. */ apply_filters( 'saai_posts_per_batch', $batch_size, $is_first_sync ); -
/** * Filter the product completion agent registry. */ apply_filters( 'saai_product_completion_agents', $agents ); -
/** * Filter the live inventory data for a product or variation. */ apply_filters( 'saai_product_inventory_data', $data, $product ); -
/** * Filter product pricing data for third-party plugin support. */ apply_filters( 'saai_product_pricing_data', $price_data, $product ); -
/** * Filter subscription data for third-party plugin support. */ apply_filters( 'saai_subscription_data', $subscription_data, $subscription ); -
/** * Filters the debounce window, in seconds, applied to save-triggered AI memory * uploads. */ apply_filters( 'saai_upload_debounce_seconds', $debounce ); -
/** * Filters how long the AI memory progress/availability counts are cached * between admin page loads, in seconds. */ apply_filters( 'saai_upload_progress_cache_ttl', self::UPLOAD_PROGRESS_CACHE_TTL_SECONDS ); -
/** * Filters the per-post-type stagger offset, in seconds, for batched AI memory * uploads. */ apply_filters( 'saai_upload_stagger_seconds', $stagger, $index ); -
/** * Filters the per-run time budget, in seconds, for the AI memory upload batch. */ apply_filters( 'saai_upload_time_budget_seconds', $budget ); -
/** * Filters how often the upload watchdog runs to re-arm a dropped queue. */ apply_filters( 'saai_upload_watchdog_interval_seconds', self::UPLOAD_WATCHDOG_INTERVAL_SECONDS ); -
/** * Page size for the lifetime order walk. Lower it on a memory-tight host; * raise it to trade memory for fewer queries. */ apply_filters( 'saai_usage_chat_orders_page_size', 500 ); -
/** * Defensive ceiling on the number of orders the check-in walks, so a very * large store cannot stall the weekly cron run. */ apply_filters( 'saai_usage_max_chat_orders', 10000 ); -
/** * Filters whether AI memory uploads use the batch endpoint. */ apply_filters( 'saai_use_batch_memory_upload', true ); -
/** * Filter the custom field values sent to AI memory for one variation. */ apply_filters( 'saai_variation_metadata', $metadata, $variation, $parent_product ); -
/** * Filters the WooCommerce to StoreAgent ability map. */ apply_filters( 'saai_woo_ability_overlap_map', self::DEFAULT_MAP ); -
/** * Filter the role keys that the customer abilities treat as wholesale customer * roles. */ apply_filters( 'saai_wwp_role_keys', $keys ); -
/** * Filter the MCP gateway origin. */ apply_filters( 'storeagent_ai_mcp_gateway_origin', $origin ); -
/** * Filter the canonical store host resolved by get_store_host(). */ apply_filters( 'storeagent_ai_store_host', null ); -
/** * Filter the escalation email content. */ apply_filters( 'storeagent_escalation_email_content', $message, $customer_name, $customer_email, $summary, $trigger ); -
/** * Fires after a successful escalation email is sent. */ do_action( 'storeagent_escalation_email_sent', $recipient, $customer_email, $customer_name, $summary, $trigger ); -
/** * Filter the escalation email subject. */ apply_filters( 'storeagent_escalation_email_subject', $subject, $customer_name, $customer_email, $store_name ); -
/** * Filter the client IP used to rate-limit guest escalation emails. */ apply_filters( 'storeagent_escalation_rate_limit_ip', $remote_addr, $user_id ); -
/** * Filter feedback settings before returning to frontend. */ apply_filters( 'storeagent_feedback_settings', $settings ); -
/** * This filter is documented in WooCommerce * `class-wc-rest-customers-v1-controller.php`. */ apply_filters( 'woocommerce_rest_customer_allowed_roles', array( 'customer', 'subscriber' ) ); -
/** * This action is documented in wp-includes/abilities-api/class-wp-ability.php */ do_action( 'wp_ability_invoked', $ability->get_name(), $input, $ability ); -
do_action( 'saai_after_review_summary_generation', $result, $product->get_name(), $product->get_id() ); -
do_action( 'saai_post_ai_memory_disabled', $post_id, $post_type ); -
apply_filters( 'action_scheduler_failure_period', 5 * MINUTE_IN_SECONDS ); -
apply_filters( 'saai_enable_subresource_integrity_check', defined( 'SAAI_ENABLE_SUBRESOURCE_INTEGRITY_CHECK' ) && SAAI_ENABLE_SUBRESOURCE_INTEGRITY_CHECK ); -
apply_filters( 'saai_product_summaries_ai_response', compact( 'product_id', 'summary' ) ); -
apply_filters( 'saai_product_summaries_ai_summary', null, $response ); -
apply_filters( "{$this->tag}_can_view", true ); -
apply_filters( "{$this->tag}_restriction_content", sprintf( '%1$s%2$s%3$s', '<p class="storeagent-ai-for-woocommerce-error">', esc_html__( 'You do not have permission to view this content.', 'storeagent-ai-for-woocommerce' ), '</p>' ) ); -
do_action( 'admin_head' ); -
do_action( 'admin_print_scripts' ); -
do_action( 'admin_print_styles' ); -
apply_filters( "option_{$key}", maybe_unserialize( $raw ), $key ); -
do_action( 'saai_admin_notices' ); -
do_action( 'saai_after_category_description_form' ); -
do_action( 'saai_after_expand_description', $id, $product_id ); -
do_action( 'saai_after_notification_accept', $id, $result ); -
do_action( 'saai_after_notification_archive', $id ); -
do_action( 'saai_after_notification_reject', $id, $result ); -
do_action( 'saai_after_notification_unarchive', $id ); -
do_action( 'saai_after_product_description_form' ); -
do_action( 'saai_after_question_submission', $question_post->ID, $question, $product_id ); -
apply_filters( 'saai_allow_delete_orphaned_product_questions', true, $product_id ); -
apply_filters( 'saai_before_create_notification', array( 'type' => $type, 'title' => $title, 'message' => $message, 'agent' => $agent, 'product_id' => $product_id, 'extra' => $extra, 'actions' => $actions, 'hide_archive' => $hide_archive, ) ); -
do_action( 'saai_before_expand_description', $id ); -
do_action( 'saai_before_notification_accept', $id ); -
do_action( 'saai_before_notification_archive', $id ); -
do_action( 'saai_before_notification_reject', $id ); -
do_action( 'saai_before_notification_unarchive', $id ); -
do_action( 'saai_before_product_description_form' ); -
apply_filters( "saai_before_rest_{$this->rest_base}_settings_save", $settings, $params, $old_settings, $request ); -
apply_filters( 'saai_bulk_run_agent_chunk_size', 10 ); -
apply_filters( 'saai_chat_indexing_help_url', self::CHAT_INDEXING_HELP_URL ); -
apply_filters( 'saai_chat_readiness_min_items', self::DEFAULT_READINESS_MIN_ITEMS ); -
apply_filters( 'saai_chat_readiness_threshold', self::DEFAULT_READINESS_THRESHOLD ); -
apply_filters( 'saai_class_object', $object, $class_object, $this ); -
apply_filters( 'saai_disable_abilities', false ); -
apply_filters( 'saai_get_product_count', 0, $notification_queue_id ); -
apply_filters( 'saai_helper_get_ai_agents', $agents ); -
do_action( 'saai_increment_response_count', get_current_user_id() ); -
apply_filters( 'saai_notification_rest_schema', $this->schema ); -
do_action( 'saai_notifications_cleaned_up', $retention_days ); -
apply_filters( 'saai_notifications_per_hour_limit', 50, $agent ); -
apply_filters( 'saai_pre_execute_notification_callback', null, $notification_id, $action ); -
apply_filters( 'saai_prepare_notification_response', $data, $notification ); -
apply_filters( 'saai_prepare_post_data', $data, $post_id, $post_type ); -
apply_filters( 'saai_prepare_post_data_metadata', array(), $post_id, $post_type ); -
apply_filters( 'saai_prepare_post_data_taxonomy_terms', array(), $post_id, $post_type ); -
apply_filters( 'saai_product_info', $product_info, $product_id ); -
apply_filters( 'saai_product_questions_ai_data', $data ); -
apply_filters( 'saai_product_summaries_ai_data', $data ); -
apply_filters( 'saai_product_summary_data', compact( 'product_name', 'product_url', 'reviews', 'passthrough' ), $this->product_id ); -
apply_filters( "saai_rest_{$this->rest_base}_settings_save_response", $response, $settings, $old_settings, $request ); -
do_action( 'saai_review_moderation_flagged', $comment_id, $result ); -
apply_filters( 'saai_review_moderation_product_data', $product_data, $product ); -
apply_filters( 'saai_review_summary_query_args', $args, $this->product_id ); -
apply_filters( 'saai_sanitize_category_description_settings', $sanitized, $params ); -
apply_filters( 'saai_sanitize_product_description_settings', $sanitized, $params ); -
apply_filters( 'saai_sanitize_product_questions_settings', $sanitized, $params ); -
apply_filters( 'saai_sanitize_product_summaries_settings', $sanitized, $params ); -
apply_filters( 'saai_sanitize_product_tags_generator_settings', $sanitized, $params ); -
apply_filters( 'saai_sanitize_product_upsells_settings', $sanitized, $params ); -
apply_filters( 'saai_sanitize_review_moderation_settings', $sanitized, $params ); -
apply_filters( 'saai_sanitize_review_summaries_settings', $sanitized, $params ); -
apply_filters( 'saai_sanitize_vendors_product_moderator_settings', $sanitized, $params ); -
apply_filters( 'saai_site_url_watcher_is_rest_request', defined( 'REST_REQUEST' ) && REST_REQUEST ); -
do_action( 'saai_vendors_product_change_requested', $product_id, $vendor_id, $message, $suggestions ); -
do_action( 'saai_vendors_product_image_moderated', $image_url, $product_data, $result ); -
do_action( 'saai_vendors_product_moderated', $product_id, $result ); -
apply_filters( 'saai_vendors_product_moderator_product_data', $product_data, $product ); -
apply_filters( 'storeagent_ai_api_endpoint', ( ( defined( 'STOREAGENT_AI_API_ENDPOINT' ) && STOREAGENT_AI_API_ENDPOINT ) ? STOREAGENT_AI_API_ENDPOINT : 'api' ) ); -
apply_filters( 'storeagent_ai_base_url', trailingslashit( ( defined( 'STOREAGENT_AI_BASE_URL' ) && STOREAGENT_AI_BASE_URL ) ? STOREAGENT_AI_BASE_URL : 'https://app.storeagent.ai' ) ); -
apply_filters( 'storeagent_chat_widget_display_on_page', is_front_page() || $is_store_page ); -
apply_filters( 'storeagent_chat_widget_page_context', $context ); -
apply_filters( 'storeagent_chat_widget_script_url', Helper::get_storeagent_base_url() . 'chat/chat.js' ); -
apply_filters( 'storeagent_inline_chat_widget_script_url', Helper::get_storeagent_base_url() . 'chat/chat-inline.js' ); -
apply_filters( 'the_content', $content ); -
apply_filters( 'woocommerce_prevent_admin_access', ! $has_cap ); -
apply_filters( "woocommerce_settings-{$group}", array() ); -
apply_filters( 'woocommerce_webhook_topic_hooks', array_fill_keys( $topics, array() ), $webhook instanceof \WC_Webhook ? $webhook : new \WC_Webhook() ); -
apply_filters( 'wpay_kses_allowed_attrs', $allowed_attrs ); -
apply_filters( 'wpay_kses_allowed_tags', $allowed_tags ); -
apply_filters( 'wwpp_disregard_cat_level_discount', get_post_meta( $post_id, 'wwpp_ignore_cat_level_wholesale_discount', true ) ); -
apply_filters( 'wwpp_disregard_role_level_discount', get_post_meta( $post_id, 'wwpp_ignore_role_level_wholesale_discount', true ) );
Generated from StoreAgent'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: