Sell.AI Stock 2.1.0 has 17 actions and 28 filters, read directly from its source code on Nov 19, 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 Sell.AI Stock fires an action
add_action( 'sellai_stock_after_sync', function( $response, $items, $args ) {
// Your code runs here.
}, 10, 3 );
// Change a value Sell.AI Stock is about to use
add_filter( 'sellai_stock_admin_tabs', function( $tabs, $arg2 ) {
// Change $tabs here.
return $tabs;
}, 10, 2 );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
-
/** * Renders a tab added by an add-on. */ do_action( "sellai_stock_admin_tab_{$tab}" ); -
/** * Filters the tabs of the plugin page (add-ons add their own and render them * on the "sellai_stock_admin_tab_{$slug}" action). */ apply_filters( 'sellai_stock_admin_tabs', $tabs, self::dev_mode() ); -
/** * Fires after a sync batch has been processed. */ do_action( 'sellai_stock_after_sync', $response, $items, $args ); -
/** * Adds rows to the endpoint list (add-ons). */ do_action( 'sellai_stock_api_endpoint_rows', $base ); -
/** * Filters the automatically assigned warehouse (when the customer did not * choose one, e.g. when adding from a product tile or a quick-order form). */ apply_filters( 'sellai_stock_auto_assign_warehouse', $chosen, (int) $owner_id, $qty, $list ); -
/** * Fires before a sync batch is processed. */ do_action( 'sellai_stock_before_sync', $items, $args ); -
/** * Whether an add-on uses a developer feature (e.g. webhooks), so the developer * tabs stay visible. */ apply_filters( 'sellai_stock_dev_features_in_use', false ); -
/** * Whether to load the front-end assets on the current page. */ apply_filters( 'sellai_stock_enqueue_assets', $needed ); -
/** * Fires after one product has been updated by a sync. */ do_action( 'sellai_stock_item_synced', $product_id, $new, $old, $item, $args ); -
/** * Fires when Sell.AI Stock is fully loaded. Integrations (ERP adapters, the * Pro add-on etc.) should hook here. */ do_action( 'sellai_stock_loaded' ); -
/** * Whether to log a run. */ apply_filters( 'sellai_stock_log_enabled', true, $channel, $source_id ); -
/** * Filters the plain-language hint for a connection error (add-ons explain * their own services' errors). */ apply_filters( 'sellai_stock_log_hint', self::generic_hint( $message ), $message ); -
/** * Filters the names of the log channels (add-ons name their own). */ apply_filters( 'sellai_stock_log_source_labels', array( 'rest' => __( 'API (your system sent the data)', 'sell-ai-stock' ), 'wc-rest' => __( 'WooCommerce REST API', 'sell-ai-stock' ), 'cli' => __( 'WP-CLI command', 'sell-ai-stock' ), 'php' => __( 'Integration (PHP)', 'sell-ai-stock' ), ) ); -
/** * Filters the sources in the log filter (add-ons add their data sources). */ apply_filters( 'sellai_stock_log_sources', array( 'csv' => __( 'CSV import', 'sell-ai-stock' ), 'rest' => __( 'API (your system sent the data)', 'sell-ai-stock' ), ) ); -
/** * Maps an external warehouse code to a registry ID. */ apply_filters( 'sellai_stock_map_warehouse_id', is_scalar( $raw_id ) ? (string) $raw_id : '', $entry, $item ); -
/** * Fires after warehouse stock was reduced for an order. */ do_action( 'sellai_stock_order_stock_reduced', $order ); -
/** * Fires after warehouse stock was restored for an order. */ do_action( 'sellai_stock_order_stock_restored', $order ); -
/** * Filters the rates allowed for a warehouse package. */ apply_filters( 'sellai_stock_package_rates', $out, $rates, $wh_id, $package ); -
/** * Address of the licence screen of the add-on. */ apply_filters( 'sellai_stock_pro_license_url', SellAI_Stock_Admin::url( 'settings' ) ); -
/** * State of Sell.AI Stock Pro, reported by the add-on: "active" or "locked". */ apply_filters( 'sellai_stock_pro_state', '' ); -
/** * Fires after the warehouse data of a product has been saved. */ do_action( 'sellai_stock_product_saved', $product_id, $new, $old, $reason ); -
/** * Extra cells of one warehouse row of the product table. Inputs named * "{$key}[…]" arrive with the product form; the free plugin ignores fields * it does not know. */ do_action( 'sellai_stock_product_table_cells', (string) $id, $key, $product_id ); -
/** * Extra column headers of the product warehouse table. */ do_action( 'sellai_stock_product_table_head', $product_id ); -
/** * Filters the warehouses offered for a product. */ apply_filters( 'sellai_stock_product_warehouses', $out, (int) $product_id ); -
/** * Filters the public data of one warehouse of a product (product page * selector, tile picker, cart). Add-ons may change "shippingInfo" (plain text) * and set "shippingEta" (string or array, printed as the data-sellai-eta * attribute next to the shipping text so a script can keep it up to date on * cached pages). */ apply_filters( 'sellai_stock_public_entry', $entry, $product, $wh ); -
/** * Whether to reduce per-warehouse stock for an order. Disable it when the ERP * is the only source of truth and pushes the stock back through the API. */ apply_filters( 'sellai_stock_reduce_stock_on_order', (bool) SellAI_Stock_Settings::get( 'reduce_stock_on_order' ), $order ); -
/** * Resolves the product for an item. Use it to match on other identifiers such * as EAN or an ERP product ID. */ apply_filters( 'sellai_stock_resolve_product_id', $product_id, $item ); -
/** * Register additional routes (e.g. an adapter endpoint that accepts an ERP's * native webhook format and calls sellai_stock_sync()). */ do_action( 'sellai_stock_rest_register_routes', self::NAMESPACE_V1 ); -
/** * Filters the default settings (add-ons add their own keys). */ apply_filters( 'sellai_stock_settings_defaults', self::core_defaults() ); -
/** * Adds rows to the settings table (add-ons). */ do_action( 'sellai_stock_settings_rows', $s, $opt ); -
/** * Filters the sanitised settings (add-ons sanitise their own keys from * $input). */ apply_filters( 'sellai_stock_settings_sanitize', $out, $input ); -
/** * Filters the per-warehouse shipping packages. */ apply_filters( 'sellai_stock_shipping_packages', $new, $packages ); -
/** * Notices at the top of the Start tab (e.g. scheduled runs not working). */ do_action( 'sellai_stock_start_notices' ); -
/** * Filters the steps of the Start checklist (add-ons add optional steps). */ apply_filters( 'sellai_stock_start_steps', $steps ); -
/** * Fires when the stock of a product in one warehouse changes. Useful for * adapters that push stock back to an ERP. */ do_action( 'sellai_stock_stock_changed', $product_id, (string) $wh_id, $before, $after, $reason ); -
/** * Filters a single item before processing. */ apply_filters( 'sellai_stock_sync_item', $item, $args ); -
/** * Filters the raw items before processing. Adapters can convert a foreign * payload (e.g. an ERP export) into the canonical format here. */ apply_filters( 'sellai_stock_sync_items', $items, $args ); -
/** * Maximum number of items accepted in one POST /stock request. */ apply_filters( 'sellai_stock_sync_max_items', 500 ); -
/** * Whether the WooCommerce stock quantity should follow the warehouse total. */ apply_filters( 'sellai_stock_sync_wc_stock', true, (int) $product_id ); -
/** * Filters the warehouse price used in the cart. */ apply_filters( 'sellai_stock_warehouse_price', $price, (int) $product_id, (string) $warehouse_id ); -
/** * Filters the warehouse registry. */ apply_filters( 'sellai_stock_warehouses', $list, $enabled_only ); -
/** * Fires after warehouses were deleted from the registry and from all products. */ do_action( 'sellai_stock_warehouses_removed', $removed, self::$purged ); -
/** * This filter is documented in woocommerce/includes/class-wc-ajax.php */ apply_filters( 'woocommerce_add_to_cart_fragments', array( 'div.widget_shopping_cart_content' => '<div class="widget_shopping_cart_content">' . $mini_cart . '</div>' ) ); -
/** * This action is documented in woocommerce/includes/class-wc-ajax.php */ do_action( 'woocommerce_ajax_added_to_cart', $product_id ); -
apply_filters( 'woocommerce_add_to_cart_validation', true, $product_id, $quantity );
Generated from Sell.AI Stock'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: