Swift Commerce 1.6.0 has 83 actions and 151 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 Swift Commerce fires an action
add_action( 'swift_commerce_abandoned_cart_before_send_email', function( $cart, $email_number, $email_config ) {
// Your code runs here.
}, 10, 3 );
// Change a value Swift Commerce is about to use
add_filter( 'swift_commerce_should_record_search_analytics', function( $value, $query, $results_count, $clicked ) {
// Change $value here.
return $value;
}, 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
-
/** * Allow extensions that maintain their own analytics pipeline to avoid * duplicate base records without placing license checks in Free. */ apply_filters( 'swift_commerce_should_record_search_analytics', true, $query, $results_count, $clicked ); -
/** * Allow Pro to generate coupons or perform pre-send logic. Pro hooks into this * to create WC_Coupon objects and attach them to the cart. */ do_action( 'swift_commerce_abandoned_cart_before_send_email', $cart, $email_number, $email_config ); -
/** * Filter max emails per cron run to avoid overloading. */ apply_filters( 'swift_commerce_abandoned_cart_email_batch_size', 50 ); -
/** * Allow Pro to modify the email body with product cards, coupons, etc. Pass * the click-tracking URL so Pro uses it instead of the raw recovery URL. */ apply_filters( 'swift_commerce_abandoned_cart_email_body', '', $cart, $email_config, $email_number, $click_track_url ); -
/** * Filter email headers for recovery emails. */ apply_filters( 'swift_commerce_abandoned_cart_email_headers', $headers, $cart, $email_number ); -
/** * Filter the maximum number of emails allowed in the sequence. Free = 1, Pro * extends to 5. */ apply_filters( 'swift_commerce_abandoned_cart_max_emails', 1 ); -
/** * Allow Pro to register additional REST routes. */ do_action( 'swift_commerce_abandoned_cart_register_routes', $namespace ); -
/** * Allow Pro to add its own settings fields (min cart value, exclude roles, * etc.). */ apply_filters( 'swift_commerce_abandoned_cart_sanitize_settings', $settings, $input ); -
/** * Let Pro and integrations exclude carts without placing Pro logic in Free. */ apply_filters( 'swift_commerce_abandoned_cart_should_track', true, (float) $cart_total, WC()->cart, $settings ); -
/** * Filters the list of addon types that behave as choice fields (have options). */ apply_filters( 'swift_commerce_addon_choice_types', array( 'checkbox', 'radio', 'select' ) ); -
/** * Filters the addon type labels shown in the admin type badge. */ apply_filters( 'swift_commerce_addon_type_labels', $type_labels ); -
/** * Allows Pro to inject additional addon type options into the dropdown. */ do_action( 'swift_commerce_addon_type_options' ); -
/** * Filters the addon price for types not handled by the free plugin. */ apply_filters( 'swift_commerce_addon_type_price', 0, $type, $addon, $value, $base_price, $addon_qty, $cart_quantity ); -
/** * Fires after all product addon fields are rendered. */ do_action( 'swift_commerce_after_product_addons', $addons, $product ); -
/** * Allow Pro to add registered assets or structured attributes without placing * license checks or locked controls in the Free plugin. */ apply_filters( 'swift_commerce_ajax_search_block_registration_args', $registration_args, $metadata ); -
/** * Allow Pro to add sanitized, structured search attributes. */ apply_filters( 'swift_commerce_ajax_search_block_shortcode_attributes', $shortcode_attributes, $attributes, $block ); -
/** * Allow Pro plugin to inject global design token fallbacks. */ apply_filters( 'swift_commerce_ajax_search_css_vars', $css_vars, $style_settings ); -
/** * Allow Pro to attach registered assets or structured attributes while keeping * the complete base notification form functional in Free. */ apply_filters( 'swift_commerce_back_in_stock_block_registration_args', $registration_args, $metadata ); -
/** * Allow extensions to add sanitized, structured form attributes. */ apply_filters( 'swift_commerce_back_in_stock_block_shortcode_attributes', $shortcode_attributes, $attributes, $block ); -
/** * Allow Pro plugin to inject global design token fallbacks. */ apply_filters( 'swift_commerce_back_in_stock_css_vars', $css_vars_arr, $style ); -
/** * Allow Pro plugin to inject font-family CSS (Google Font enqueue + inline * style). */ apply_filters( 'swift_commerce_back_in_stock_font_css', '', $style ); -
/** * Fires inside the BIS subscribe form after the email field row. */ do_action( 'swift_commerce_back_in_stock_form_after_field', $product, $settings ); -
/** * Fires after BIS frontend scripts are enqueued. */ do_action( 'swift_commerce_back_in_stock_frontend_scripts', $settings ); -
/** * Filter the BIS settings exposed to the frontend. */ apply_filters( 'swift_commerce_back_in_stock_frontend_settings', $frontend, $settings ); -
/** * Validate a subscribe request before processing. */ apply_filters( 'swift_commerce_back_in_stock_validate_subscribe', null, $request, $product_id, $email ); -
/** * Fires before the wishlist page content. Pro uses this to render tab * navigation for multiple wishlists. */ do_action( 'swift_commerce_before_wishlist_page_content', $items, $settings ); -
/** * Hook for Pro plugin to add additional admin panel sections. */ do_action( 'swift_commerce_bundle_admin_panel_after', $post->ID ); -
/** * Hook for Pro plugin to add content before the add-to-cart button. */ do_action( 'swift_commerce_bundle_before_add_to_cart_button', $product, $bundle_items, $settings ); -
/** * Filter bundle cart item data. */ apply_filters( 'swift_commerce_bundle_cart_item_data', $cart_item_data, $product_id, $bundle_items ); -
/** * Filter whether a bundle product is purchasable. */ apply_filters( 'swift_commerce_bundle_is_purchasable', $is_purchasable, $this ); -
/** * Hook for Pro plugin to inject content per bundle item. */ do_action( 'swift_commerce_bundle_item_content', $item, $item_product, $index ); -
/** * Hook for Pro plugin to save additional meta data. */ do_action( 'swift_commerce_bundle_save_meta', $post_id ); -
/** * Validate bundle add-to-cart. */ apply_filters( 'swift_commerce_bundle_validate_add_to_cart', $passed, $product_id, $bundle_items, $quantity ); -
/** * Fired when a cart is recovered via the recovery link. */ do_action( 'swift_commerce_cart_recovery_link_clicked', $cart ); -
/** * Allow Pro to add its own registered editor/style handles or structured * attributes without adding locked controls to Free. */ apply_filters( 'swift_commerce_currency_switcher_block_registration_args', $registration_args, $metadata ); -
/** * Allow Pro to add sanitized, structured rendering attributes. */ apply_filters( 'swift_commerce_currency_switcher_block_shortcode_attributes', $shortcode_attributes, $attributes, $block ); -
/** * Filter the list of WooCommerce email IDs that receive Swift Commerce custom * header/footer branding. */ apply_filters( 'swift_commerce_customized_email_ids', $email_ids ); -
/** * Allow Pro to handle Admin Approval mode. */ apply_filters( 'swift_commerce_email_verification_handle_registration', false, $user_id, $settings ); -
/** * Allow Pro to handle Admin Approval mode for WooCommerce registrations. */ apply_filters( 'swift_commerce_email_verification_handle_wc_registration', false, $customer_id, $settings ); -
/** * Filter the redirect URL after email verification. */ apply_filters( 'swift_commerce_email_verification_redirect_url', $redirect_url, $record->user_id, $this->get_settings() ); -
/** * Allow Pro plugin to inject global design token fallbacks. */ apply_filters( 'swift_commerce_gdpr_css_vars', $css_vars_parts, $appearance ); -
/** * Allow Pro plugin to inject additional frontend data (e.g. geo-targeting * info). */ apply_filters( 'swift_commerce_gdpr_frontend_settings', $frontend_settings ); -
/** * Let other plugins or Pro add their cookie entries. */ apply_filters( 'swift_commerce_gdpr_scanned_cookies', $cookies ); -
/** * Fires before the standard option fields in an option row. */ do_action( 'swift_commerce_option_row_before_fields', $option, $index, $type ); -
/** * Allow Pro plugin to append additional inline CSS (close button styling, text * alignment, etc.). */ apply_filters( 'swift_commerce_popup_inline_css', $css, $styles ); -
/** * Allow Pro plugin to sanitize and merge additional style settings (close * button, text alignment, and any future Pro-only style fields). */ apply_filters( 'swift_commerce_popup_sanitize_styles', $sanitized, $styles ); -
/** * Allow Pro plugin to resolve global design tokens as defaults. */ apply_filters( 'swift_commerce_popup_style_defaults', $styles ); -
/** * Fires after the standard addon fields in the admin panel. */ do_action( 'swift_commerce_product_addon_admin_fields', $addon, $index ); -
/** * Fires after the primary control for one addon field. */ do_action( 'swift_commerce_product_addon_after_field', $addon, $index, $field_name, $settings, $customization ); -
/** * Per-addon quantity multiplier. */ apply_filters( 'swift_commerce_product_addon_quantity', 1, $addon, $value ); -
/** * Filters the product-addons frontend template path. */ apply_filters( 'swift_commerce_product_addons_template', $template_path, $product ); -
/** * Filter the total addon price. */ apply_filters( 'swift_commerce_product_addons_total', $total, $selected_addons, $base_price ); -
/** * Allow Pro to attach registered assets or structured attributes while keeping * the complete base bundle purchase flow functional in Free. */ apply_filters( 'swift_commerce_product_bundle_block_registration_args', $registration_args, $metadata ); -
/** * Allow extensions to add sanitized, structured bundle attributes. */ apply_filters( 'swift_commerce_product_bundle_block_shortcode_attributes', $shortcode_attributes, $attributes, $block ); -
/** * Filter reCAPTCHA analytics data. Allows Pro plugin to provide analytics from * the captcha_logs table. */ apply_filters( 'swift_commerce_recaptcha_analytics', null, $period ); -
/** * Filter reCAPTCHA settings before sending to the React app. Allows Pro plugin * to add theme, size, IP whitelist, and Pro provider keys. */ apply_filters( 'swift_commerce_recaptcha_get_settings', $settings ); -
/** * Filter reCAPTCHA settings before saving. Allows Pro plugin to save theme, * size, IP whitelist, Pro locations, and Pro provider keys. */ apply_filters( 'swift_commerce_recaptcha_save_settings', $settings, $params ); -
/** * Fires for addon field types not handled by the free plugin. */ do_action( 'swift_commerce_render_addon_field_type', $type, $addon, $field_name, $settings, $customization ); -
/** * Filters the sanitized addon data. */ apply_filters( 'swift_commerce_sanitize_addon_data', $clean, $addon ); -
/** * Filter search arguments before the WP_Query is run. Pro uses this for field * weight ordering and boost settings. */ apply_filters( 'swift_commerce_search_products_args', $search_args, $query ); -
/** * Filter the search query before it's used. Pro uses this for synonym * expansion and typo tolerance. */ apply_filters( 'swift_commerce_search_query', $query ); -
/** * Filter search results before returning to the client. Extensions may add * presentational fields but should not record analytics here. */ apply_filters( 'swift_commerce_search_results', $results, $query ); -
/** * Hook for Pro to add extended edit fields (total, end_date, trial_end, * payment_method, etc.) */ do_action( 'swift_commerce_subscription_edit_fields', $subscription ); -
/** * Filter the per-unit amount charged at initial checkout. */ apply_filters( 'swift_commerce_subscription_initial_price', $initial_price, $product, $cart_item_data ); -
/** * Filter available test email types. */ apply_filters( 'swift_commerce_test_email_types', $email_types, $settings, $draft ); -
/** * Fires after the wishlist button is rendered. Pro uses this to render the * wishlist picker dropdown. */ do_action( 'swift_commerce_wishlist_after_button', $product_id, $context, $in_wishlist ); -
/** * Fires after wishlist scripts are enqueued. Pro uses this to enqueue its own * scripts/styles and add localized data. */ do_action( 'swift_commerce_wishlist_after_scripts', $this->settings ); -
/** * Allow Pro to add registered assets or structured attributes while keeping * the complete base block functional in Free. */ apply_filters( 'swift_commerce_wishlist_block_registration_args', $registration_args, $metadata ); -
/** * Allow extensions to add sanitized, structured Wishlist attributes. */ apply_filters( 'swift_commerce_wishlist_block_shortcode_attributes', $shortcode_attributes, $attributes, $block ); -
/** * Allow Pro to attach registered assets or structured attributes while keeping * the complete base button functional in Free. */ apply_filters( 'swift_commerce_wishlist_button_block_registration_args', $registration_args, $metadata ); -
/** * Allow extensions to add sanitized, structured button attributes. */ apply_filters( 'swift_commerce_wishlist_button_block_shortcode_attributes', $shortcode_attributes, $attributes, $block ); -
/** * Allow Pro to fully replace the wishlist page output (e.g. multi-wishlist * tabbed view, shared view). */ apply_filters( 'swift_commerce_wishlist_shortcode_output', null, $atts ?? array() ); -
/** * Allow Pro plugin to resolve global design tokens as defaults. */ apply_filters( 'swift_commerce_wishlist_style_defaults', $s ); -
do_action( 'woocommerce_email_header', $email_heading, $email ); -
apply_filters( 'swift_commerce_checkout_conditional_logic_enabled', false ); -
apply_filters( 'swift_commerce_license_info', $license_info ); -
apply_filters( 'swift_commerce_recaptcha_skip_logged_in_comments', true ); -
do_action( 'swift_commerce_subscription_before_add_to_cart' ); -
apply_filters( 'woocommerce_get_price_html', $price_html, $this ); -
apply_filters( 'swift_commerce_ajax_search_settings', $settings ); -
apply_filters( 'swift_commerce_bundle_prepare_cart_items', $bundle_items, $product_id ); -
apply_filters( 'swift_commerce_email_verification_link_expiry_hours', 24 ); -
apply_filters( 'swift_commerce_email_verification_settings', $settings ); -
apply_filters( 'swift_commerce_gdpr_consent_logging_active', false, $settings ); -
apply_filters( 'swift_commerce_product_addon_is_active', true, $addon, $index, $addons, $selected_addons, $product_id ); -
apply_filters( 'swift_commerce_subscription_add_to_cart_text', $text, $this ); -
apply_filters( 'swift_commerce_subscription_customer_can_pause', true, $subscription ); -
apply_filters( 'swift_commerce_subscription_customer_can_renew', false, $subscription ); -
apply_filters( 'swift_commerce_subscription_single_add_to_cart_text', __('Sign Up Now', 'swift-commerce') ); -
do_action( 'swift_commerce_subscription_updated', $subscription_id, $data ); -
do_action( 'swift_commerce_user_approved', $user_id, $this->get_settings() ); -
do_action( 'swift_commerce_user_rejected', $user_id, $user, $this->get_settings() ); -
apply_filters( 'woocommerce_add_to_cart_form_action', $product->get_permalink() ); -
apply_filters( 'woocommerce_add_to_cart_validation', true, $product_id, $quantity, $variation_id, $variations ); -
do_action( 'woocommerce_after_add_to_cart_button' ); -
do_action( 'woocommerce_before_add_to_cart_button' ); -
do_action( 'admin_notices' ); -
do_action( 'swift_commerce_abandoned_cart_before_delete', $ids ); -
apply_filters( 'swift_commerce_abandoned_cart_cleanup_batch_size', 250 ); -
do_action( 'swift_commerce_abandoned_cart_coupon_invalidated', (int) $existing->id, $existing->coupon_code ); -
do_action( 'swift_commerce_abandoned_cart_coupon_redeemed', $cart_id, $cart->coupon_code, $order ); -
apply_filters( 'swift_commerce_abandoned_cart_item_data', $payload['item_data'], $item, $cart_item_key ); -
apply_filters( 'swift_commerce_abandoned_cart_item_data_keys', array( 'SWIFT_COMMERCE_bundle_items', 'SWIFT_COMMERCE_bundle_variations', 'swift_commerce_bundle_items', 'swift_commerce_bundle_price', 'swift_commerce_bundle_hash', 'SWIFT_COMMERCE_addons', 'subscription_plan_index', 'subscription_plan', 'subscription_purchase_mode', 'subscription_buy_now_price', ), $item, $cart_item_key ); -
do_action( 'swift_commerce_abandoned_cart_order_created', $cart_id, $order ); -
do_action( 'swift_commerce_abandoned_cart_recovered', $cart_id, $order ); -
do_action( 'swift_commerce_after_ajax_search_query', $search_args, $query ); -
do_action( 'swift_commerce_after_renewal_payment', $order, $subscription, $result ); -
apply_filters( 'swift_commerce_ajax_search_default_settings', $defaults ); -
apply_filters( 'swift_commerce_ajax_search_sanitized_settings', $sanitized ); -
apply_filters( 'swift_commerce_ajax_search_save_settings', $settings, $this->settings ); -
do_action( 'swift_commerce_ajax_search_settings_saved', $this->settings ); -
apply_filters( 'swift_commerce_auto_detect_currency', null, $this->settings ); -
apply_filters( 'swift_commerce_back_in_stock_batch_size', 25 ); -
apply_filters( 'swift_commerce_back_in_stock_max_attempts', 3 ); -
do_action( 'swift_commerce_before_ajax_search_query', $search_args, $query ); -
do_action( 'swift_commerce_before_renewal_payment', $order, $subscription ); -
do_action( 'swift_commerce_before_subscription_delete', $subscription_id ); -
apply_filters( 'swift_commerce_bundle_allow_quantity_controls', false, $product ); -
apply_filters( 'swift_commerce_bundle_cart_price', $cart_price, $snapshot, $product_id, $bundle_items ); -
apply_filters( 'swift_commerce_bundle_default_settings', $defaults ); -
apply_filters( 'swift_commerce_bundle_item_quantity_limits', array( 'min' => $min_qty, 'max' => $max_qty, 'default' => $default_qty ), $item, $product ); -
apply_filters( 'swift_commerce_bundle_item_stock_html', wc_get_stock_html( $pricing_product ), $pricing_product, $product, $customization ); -
apply_filters( 'swift_commerce_bundle_order_price_display', 'bundle', $item->get_product_id() ); -
apply_filters( 'swift_commerce_bundle_purchasability_items', $this->get_bundle_items(), $this ); -
apply_filters( 'swift_commerce_bundle_resolved_sale_price', $price, $this ); -
apply_filters( 'swift_commerce_bundle_stock_items', $this->get_bundle_items(), $this ); -
apply_filters( 'swift_commerce_captcha_should_render', $should, $this->settings ); -
apply_filters( 'swift_commerce_captcha_should_verify', $should, $this->settings ); -
do_action( 'swift_commerce_cart_abandoned', $flagged_cart ); -
apply_filters( 'swift_commerce_checkout_can_add_fields', false ); -
apply_filters( 'swift_commerce_checkout_field_display_value', $formatted, $field, $order, $context ); -
apply_filters( 'swift_commerce_checkout_field_type_available', $available, $type ); -
apply_filters( 'swift_commerce_currency_after_rounding', $converted, $price, $product, $current_code, $current_currency ); -
apply_filters( 'swift_commerce_currency_fixed_product_price', null, $price, $product, $current_code, $current_currency, current_filter() ); -
do_action( 'swift_commerce_currency_switcher_settings_saved', $settings, $old_settings ); -
apply_filters( 'swift_commerce_email_customizer_draft_body', $body, $draft, $settings ); -
apply_filters( 'swift_commerce_email_verification_login_error_message', $message, $user ); -
do_action( 'swift_commerce_email_verification_register_pro_routes', $this ); -
apply_filters( 'swift_commerce_email_verification_registration_message', $errors, $redirect_to ); -
do_action( 'swift_commerce_email_verification_save_pro_settings', $settings ); -
apply_filters( 'swift_commerce_email_verification_settings_save_error', null ); -
do_action( 'swift_commerce_fs_loaded' ); -
apply_filters( 'swift_commerce_gdpr_client_ip', $address ); -
apply_filters( 'swift_commerce_gdpr_default_settings', $defaults ); -
apply_filters( 'swift_commerce_gdpr_handle_consent_log', array( 'logged' => false, 'message' => 'Consent acknowledged.', ), $consent_data, $settings ); -
do_action( 'swift_commerce_gdpr_settings_saved', $sanitized ); -
apply_filters( 'swift_commerce_handle_renewal_failure_retry', false, $subscription, $failure_count, $reason ); -
apply_filters( 'swift_commerce_is_pro', null ); -
apply_filters( 'swift_commerce_pro_features', array() ); -
do_action( 'swift_commerce_product_added_to_wishlist', $product_id, $variation_id, $wishlist_id ); -
apply_filters( 'swift_commerce_product_addon_display_value', $display_value, $addon, $value, $addon_data ); -
apply_filters( 'swift_commerce_product_addon_order_data', $addon_data, $item, $order ); -
apply_filters( 'swift_commerce_product_addon_submitted_schema', $addon, $index, $request_values ); -
apply_filters( 'swift_commerce_product_addon_submitted_value', $raw_value, $addon, $index, $product_id ); -
apply_filters( 'swift_commerce_product_addon_types', array( 'checkbox', 'radio', 'select', 'text', 'textarea', 'heading' ) ); -
apply_filters( 'swift_commerce_product_addons_customization', $customization, wp_parse_args( $stored, $defaults ) ); -
apply_filters( 'swift_commerce_product_addons_settings', $settings ); -
apply_filters( 'swift_commerce_product_addons_validate', true, $selected_addons, $addons, $product_id ); -
do_action( 'swift_commerce_product_removed_from_wishlist', $product_id, $variation_id, $wishlist_id ); -
do_action( 'swift_commerce_quantity_limits_admin_scripts', $hook ); -
apply_filters( 'swift_commerce_quantity_limits_default_settings', $defaults ); -
do_action( 'swift_commerce_quantity_limits_product_panel', $post->ID ); -
apply_filters( 'swift_commerce_quantity_limits_product_rules', array( 'min_qty' => $min_qty !== '' ? absint( $min_qty ) : '', 'max_qty' => $max_qty !== '' ? absint( $max_qty ) : '', 'step_qty' => $step_qty !== '' ? max( 1, absint( $step_qty ) ) : '', ), $product, $min_qty, $max_qty, $step_qty ); -
do_action( 'swift_commerce_quantity_limits_register_rest_routes' ); -
do_action( 'swift_commerce_quantity_limits_save_product_meta', $post_id ); -
do_action( 'swift_commerce_quantity_limits_validate_cart' ); -
do_action( 'swift_commerce_quantity_limits_validate_checkout' ); -
apply_filters( 'swift_commerce_recaptcha_allowed_hostnames', array_filter( array( $home_host ) ) ); -
apply_filters( 'swift_commerce_recaptcha_allowed_providers', array( 'google-recaptcha', '' ) ); -
apply_filters( 'swift_commerce_recaptcha_checkout_blocks_config', $config, $this->settings ); -
apply_filters( 'swift_commerce_recaptcha_expected_action', $actions[ $location ] ?? 'swift_submit', $location ); -
apply_filters( 'swift_commerce_recaptcha_provider_script_handle', 'swift-commerce-google-recaptcha', $this->get_provider() ); -
apply_filters( 'swift_commerce_recaptcha_rate_limit', 30, $location ); -
apply_filters( 'swift_commerce_recaptcha_render_attributes', array( 'class' => 'g-recaptcha', 'data-action' => $action ), $this->settings ); -
apply_filters( 'swift_commerce_recaptcha_should_render', true, $this->settings ); -
apply_filters( 'swift_commerce_recaptcha_should_verify', true, $this->settings ); -
apply_filters( 'swift_commerce_recaptcha_token_max_length', 4096, $provider ); -
apply_filters( 'swift_commerce_recaptcha_trusted_proxy_ranges', array() ); -
do_action( 'swift_commerce_recaptcha_verification_result', $result, $location, $this->settings ); -
apply_filters( 'swift_commerce_recaptcha_verify_provider', null, $provider, $token, $location, $this->settings ); -
apply_filters( 'swift_commerce_registration_access_providers', array() ); -
apply_filters( 'swift_commerce_registration_form_default_fields', $fields ); -
apply_filters( 'swift_commerce_registration_form_default_settings', $defaults ); -
do_action( 'swift_commerce_registration_form_init', $this ); -
do_action( 'swift_commerce_registration_form_rest_routes' ); -
do_action( 'swift_commerce_registration_form_user_registered', $user_id, $this->settings ); -
do_action( 'swift_commerce_save_subscription_pro_meta', $post_id ); -
apply_filters( 'swift_commerce_script_data', array( 'ajaxUrl' => admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('swift_commerce_nonce'), 'restNonce' => wp_create_nonce('wp_rest'), 'apiUrl' => rest_url('swift-commerce/v1'), 'pluginUrl' => SWIFT_COMMERCE_PLUGIN_URL, 'adminUrl' => admin_url(), 'dashboardUrl' => admin_url('admin.php?page=swift-commerce-dashboard'), 'siteUrl' => home_url(), 'isWooCommerceActive' => class_exists('WooCo... ); -
apply_filters( 'swift_commerce_search_analytics_cleanup_batch_size', 500 ); -
apply_filters( 'swift_commerce_search_analytics_retention_days', 365 ); -
do_action( 'swift_commerce_search_performed', $query, absint($results_count), false ); -
apply_filters( 'swift_commerce_search_suggestion_minimum_count', 3 ); -
apply_filters( 'swift_commerce_search_token_lifetime', 15 * MINUTE_IN_SECONDS ); -
apply_filters( 'swift_commerce_should_record_search_click_analytics', true, $search_term, $product_id ); -
do_action( 'swift_commerce_stock_subscription_created', $subscription_id, $product_id, $email ); -
apply_filters( 'swift_commerce_subscription_admin_can_edit_details', false, $subscription, $params ); -
apply_filters( 'swift_commerce_subscription_allow_automatic_payment', true, $subscription, $order ); -
apply_filters( 'swift_commerce_subscription_auto_restore_after_payment', false, $subscription, $order ); -
apply_filters( 'swift_commerce_subscription_cart_item_data', $cart_item_data, $product_id, $variation_id ); -
do_action( 'swift_commerce_subscription_created', $subscription_id, $data ); -
do_action( 'swift_commerce_subscription_created_notification', $subscription_id ); -
apply_filters( 'swift_commerce_subscription_creation_data', $subscription_data, $product, $item, $order ); -
apply_filters( 'swift_commerce_subscription_default_settings', $defaults ); -
do_action( 'swift_commerce_subscription_deleted', $subscription_id ); -
do_action( 'swift_commerce_subscription_expired', $subscription['id'] ); -
apply_filters( 'swift_commerce_subscription_frontend_custom_properties', $properties, $settings, $customization ); -
do_action( 'swift_commerce_subscription_list_after_heading' ); -
do_action( 'swift_commerce_subscription_maintenance' ); -
do_action( 'swift_commerce_subscription_max_failures', $subscription['id'] ); -
do_action( 'swift_commerce_subscription_product_options_buy_now', $post->ID ); -
do_action( 'swift_commerce_subscription_product_options_customer_controls', $post->ID ); -
do_action( 'swift_commerce_subscription_product_options_free_trial', $post->ID ); -
do_action( 'swift_commerce_subscription_product_options_payment_retry', $post->ID ); -
do_action( 'swift_commerce_subscription_product_options_renewal_expiration', $post->ID ); -
do_action( 'swift_commerce_subscription_product_options_synchronization', $post->ID ); -
do_action( 'swift_commerce_subscription_render_create_page' ); -
apply_filters( 'swift_commerce_subscription_renewal_batch_size', 20 ); -
do_action( 'swift_commerce_subscription_renewal_failed', $subscription['id'], $reason ); -
do_action( 'swift_commerce_subscription_renewal_reminder', $subscription['id'], $order->get_id() ); -
do_action( 'swift_commerce_subscription_renewal_success', $subscription['id'], $order_id ); -
apply_filters( 'swift_commerce_subscription_renewal_total', $agreement_total, $subscription, $product ); -
apply_filters( 'swift_commerce_subscription_save_data', $update_data, $subscription_id ); -
do_action( 'swift_commerce_subscription_settings_saved', $settings ); -
do_action( "swift_commerce_subscription_status_{$new_status}", $subscription_id, $old_status ); -
apply_filters( 'swift_commerce_subscription_status_batch_size', 100 ); -
do_action( 'swift_commerce_subscription_status_changed', $subscription_id, $new_status, $old_status ); -
apply_filters( 'swift_commerce_subscription_status_transitions', $allowed_transitions, $subscription ); -
do_action( 'swift_commerce_subscription_trial_ending', $subscription['id'] ); -
do_action( 'swift_commerce_user_verified', $user_id ); -
do_action( 'woocommerce_ajax_added_to_cart', $product_id ); -
apply_filters( 'woocommerce_cart_redirect_after_error', get_permalink( $product_id ), $product_id ); -
apply_filters( 'woocommerce_product_add_to_cart_text', $button_text, $this ); -
apply_filters( 'woocommerce_product_add_to_cart_url', $this->get_permalink(), $this );
Generated from Swift Commerce'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: