Hooks reference
Every action and filter the plugins provide, with their arguments and when they run.
Filters and query
| Filter | Arguments | Use |
|---|---|---|
siteryn_apsf_filters | FilterInterface[] $filters | Register or remove filters (guide) |
siteryn_apsf_filter_values | $values, $params | Normalized values per filter id (Pro presets use it) |
siteryn_apsf_per_page | $per_page, $values | Products per request (hard cap 100) |
siteryn_apsf_sort_options | $options, $has_keyword | Sort options; keys are WooCommerce orderby values |
siteryn_apsf_query_args | $args, FilterState $state | The WP_Query args |
siteryn_apsf_query_result | $result, $state | The query result |
siteryn_apsf_query_cache_enabled | $enabled, $state | Cache query results (default: a persistent object cache is present) |
siteryn_apsf_categories | $list, $hide_empty | Categories offered by the category filter |
siteryn_apsf_price_range | array{min, max} $range | The price slider's bounds |
siteryn_apsf_show_view_all | $show, $state | Show Free's page links under the results (Pro pagination turns it off) |
siteryn_apsf_main_query_filtered (action) | WP_Query $query, $state | Filters were applied to WooCommerce's main shop query |
Live search
| Hook | Arguments | Use |
|---|---|---|
siteryn_apsf_rest_suggestions_response | $data, $state, $result | The /suggestions response |
siteryn_apsf_rest_products_response | $data, $state, $result | The /products response |
siteryn_apsf_suggestions_cache_enabled | $enabled | Cache suggestions in transients (default: guests, without a persistent object cache) |
siteryn_apsf_suggestions_cache_vary | $vary | What a cached suggestion response varies by (language, currency, settings…); add anything your store changes per guest |
Shop pages and output
| Hook | Arguments | Use |
|---|---|---|
siteryn_apsf_theme_shop_selectors | array{filters, products, extra} $selectors | CSS selectors for your theme's sidebar, product area and other parts updated without a reload |
siteryn_apsf_filter_shortcode_args | $args, $raw_atts | Render args of [siteryn_apsf_filter] (Pro presets use it) |
siteryn_apsf_filters_before · _filters_after (actions) | $state, $widget_id | Top and bottom of the filter panel |
siteryn_apsf_results_after (action) | $state, $result | After the results (Pro pagination) |
siteryn_apsf_result_item_actions (action) | WC_Product $product | Inside a plugin card's icon buttons, between add to cart and view (use the siteryn-apsf-product__action class) |
siteryn_apsf_result_item_after (action) | WC_Product $product | End of a plugin card |
siteryn_apsf_allowed_html | $allowed | wp_kses() tags and attributes allowed in rendered fragments |
siteryn_apsf_locate_template | $path, $template_name | Template path |
siteryn_apsf_before_template · _after_template (actions) | $template_name, $args | Around every template |
Assets and settings
| Hook | Arguments | Use |
|---|---|---|
siteryn_apsf_enqueue_assets | bool $needs | Load the files on more pages (builder widgets use it) |
siteryn_apsf_assets_enqueued (action) | — | Once, right after the frontend files are enqueued |
siteryn_apsf_frontend_config | $config | window.siterynApsfConfig |
siteryn_apsf_settings_css | $css, $settings | The inline CSS built from the Design settings |
siteryn_apsf_settings_get_all | $settings | Change Free settings at runtime |
siteryn_apsf_settings_sections · _fields | $sections · $fields | Add tabs and fields; give a section its own option_group/option_name |
siteryn_apsf_settings_reset_actions · _save_redirect | $actions · $redirect, $option_name | Reset handlers per option · refuse a save and send to a tab |
siteryn_apsf_settings_nav_parent · _nav_parent_label · _nav_visible · _nav_badge · _nav_icon · _nav_sublabel · _description | $value, $section | Menu placement and labels. Defaults: Behavior/Suggestions under Live Search, Sorting under Results, Responsive under Design |
siteryn_apsf_settings_main_after · siteryn_apsf_settings_sidebar (actions) | $section | Content under the General tab's form · in its sidebar |
siteryn_apsf_pro_license_active | bool $active | Answered by Pro; shown on System Status |
siteryn_apsf_loaded · siteryn_apsf_upgrade (actions) | $plugin · $old, $new | Booted · version changed |
siteryn_apsf_language_switched (action) | $code, $previous | A REST request switched to the shopper's language |
siteryn_dashboard_plugins · siteryn_deactivation_feedback_endpoint | $plugins · $url | Plugins on the shared Siteryn menu page · where the deactivation survey is sent (shared by all Siteryn plugins) |
Pro
| Hook | Arguments | Use |
|---|---|---|
siteryn_apsf_pro_taxonomies | $list (taxonomy => label) | Taxonomies offered under Filter by (product taxonomies only) |
siteryn_apsf_pro_settings_get_all | $settings | Change Pro settings at runtime |
siteryn_apsf_pro_frontend_config | $config | window.siterynApsfProConfig |
siteryn_apsf_pro_admin_config | $config | window.siterynApsfProAdminConfig on the settings and attribute term screens |
siteryn_apsf_pro_license_allow_insecure_api | bool $allow | Allow a non-HTTPS license API (local development only) |
siteryn_apsf_pro_loaded · siteryn_apsf_pro_upgrade (actions) | $plugin · $old, $new | Pro booted (Free hides its upsells) · Pro version changed |
siteryn_apsf_pro_license_check (cron action) | — | Twice-daily license check |
Example
// Remove "Popularity" from the sort menu, and add a theme product-area selector.
add_filter( 'siteryn_apsf_sort_options', function ( $options ) {
unset( $options['popularity'] );
return $options;
} );
add_filter( 'siteryn_apsf_theme_shop_selectors', function ( $selectors ) {
array_unshift( $selectors['products'], '.my-theme-products' );
return $selectors;
} );