TrafficFlow OnePageCheckout for WooCommerce 4.9.0 has 38 actions and 96 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 TrafficFlow OnePageCheckout for WooCommerce fires an action
add_action( 'opcw_footnav_links', function() {
// Your code runs here.
}, 10, 1 );
// Change a value TrafficFlow OnePageCheckout for WooCommerce is about to use
add_filter( 'opcw_blocks_preload_cart', 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 action is documented in woocommerce/src/Blocks/BlockTypes/Checkout.php */ do_action( 'woocommerce_blocks_checkout_enqueue_data' ); -
/** * This filter is documented in includes/class-opcw-blocks.php */ apply_filters( 'opcw_blocks_preload_cart', true ); -
/** * This filter is documented in includes/class-opcw-blocks.php * (OPCW_Blocks::mode()). */ apply_filters( 'opcw_engine_blocks', true ); -
/** * Enqueue extension admin assets here (our settings screen only; depend on the * `opcw-admin` handle). */ do_action( 'opcw_admin_assets', $tab ); -
/** * Inside the Address autocomplete card, under the Provider control: a source's * own panel (e.g. its usage, the pro edition's Google key). Give it * `data-opcw-acx-panel="<source>"` to show it only while that source is * selected. */ do_action( 'opcw_admin_autocomplete_body', $source ); -
/** * Inside the "Good to know" list of the Autocomplete tab: a source's own * `<dt>` / `<dd>` pairs. Give each `data-opcw-acx-panel="<source>"` to show it * only while that source is selected. */ do_action( 'opcw_admin_autocomplete_notes', $source ); -
/** * Extra markup after the settings screen's kicker ("OnePageCheckout for * WooCommerce"), e.g. an edition chip. Core prints none. */ apply_filters( 'opcw_admin_kicker', '' ); -
/** * The settings sidebar (under the live preview on the Checkout, Design and * Content tabs, alone on the others). Core prints its own card only while * nothing is hooked here. */ do_action( 'opcw_admin_sidebar', $tab ); -
/** * Content of an extension tab (registered via opcw_admin_tabs). */ do_action( "opcw_admin_tab_{$tab}", $tab ); -
/** * Every tab, below the tab content, above the Save footer. */ do_action( 'opcw_admin_tab_after', $tab ); -
/** * Every tab, above the tab content (inside the settings form). */ do_action( 'opcw_admin_tab_before', $tab ); -
/** * Where a callback of woocommerce_review_order_after_payment prints on the * classic checkout. */ apply_filters( 'opcw_after_payment_position', $default, $fn, (int) $prio ); -
/** * Print markup directly after a checkout section. */ do_action( 'opcw_after_section', $section, $ctx ); -
/** * Show a magnifier in the street field while address suggestions are live * (both engines). */ apply_filters( 'opcw_autocomplete_icon', true ); -
/** * Filter the effective autocomplete provider. */ apply_filters( 'opcw_autocomplete_provider', $provider ); -
/** * Sources on the Autocomplete tab (also the valid `autocomplete_source` * values). */ apply_filters( 'opcw_autocomplete_source_choices', $core ); -
/** * The status pill of the Autocomplete card: what the checkout serves right * now. A provider that can be selected but not serving (e.g. paused until a * quota resets) returns its own state here. */ apply_filters( 'opcw_autocomplete_status', $status, $provider ); -
/** * Print markup directly before a checkout section. */ do_action( 'opcw_before_section', $section, $ctx ); -
/** * Whether the billing form's actions print outside the collapsed billing panel * (before-hook: Billing section top; after-hook: Contact). */ apply_filters( 'opcw_billing_form_hooks_in_contact', true ); -
/** * The billing keys rendered inside the collapsed billing panel (classic); * every other billing field renders visible. */ apply_filters( 'opcw_billing_panel_keys', $keys, $billing ); -
/** * The whole Block Mode boot payload (window.opcwBlocks). */ apply_filters( 'opcw_blocks_config', $config ); -
/** * Anchor overrides for checkout-block extensions in Block Mode: block name => * anchor (e.g. 'contact:end', 'payment:before_terms'; EXTENDING.md lists * them). */ apply_filters( 'opcw_blocks_extension_anchors', array() ); -
/** * Host WooCommerce checkout-block extensions in Block Mode (additional * checkout fields aside: those always render). false = no phantom render of * the checkout block, no integration scripts, no extension host β the 4.4 * behaviour. */ apply_filters( 'opcw_blocks_extensions', true ); -
/** * Checkout-block extension blocks Block Mode never renders (block names). */ apply_filters( 'opcw_blocks_extensions_skip', array() ); -
/** * The `settings` part of the Block Mode boot payload * (window.opcwBlocks.settings). */ apply_filters( 'opcw_blocks_settings', $settings ); -
/** * The plugin that runs the checkout page; OnePageCheckout steps back * completely while it is not ''. Return '' to keep the one-page checkout * anyway, or a name to declare an owner it does not know. */ apply_filters( 'opcw_checkout_owner', (string) $owner, $context ); -
/** * The pages OnePageCheckout takes over as the checkout. */ apply_filters( 'opcw_checkout_page_ids', $ids, $assigned ); -
/** * The compact header on the checkout (both engines). */ apply_filters( 'opcw_compact_header', false ); -
/** * The engine's files are loaded (4.6), before `plugins_loaded`. Add-ons that * need the core classes at include time attach here; `opcw_loaded` remains the * place for runtime hooks. */ do_action( 'opcw_core_included', OPCW_FILE ); -
/** * Design tokens of the checkout (both engines) and the admin preview. */ apply_filters( 'opcw_design_tokens', $core ); -
/** * Handles (a regular expression) of plugin-hosted styles or scripts the * checkout and thank-you takeovers dequeue, on top of the active theme's * assets. Return '' to drop none of them; match a handle with * `opcw_keep_style_pattern` / `opcw_keep_script_pattern` to keep just that * one. */ apply_filters( 'opcw_drop_asset_handle_pattern', $default, $type ); -
/** * Plugin-shipped checkout modules that restyle/rescript the checkout DOM * survive the theme-URI check and fight our shell β drop assets whose URL * contains one of these substrings too (styles AND scripts). Since 4.5.0 also * the page builders' front-end folders: the takeover templates never render * builder content, so their CSS only restyles our markup (the Elementor kit is * scoped to a body class) a... */ apply_filters( 'opcw_drop_asset_pattern', array( 'astra-addon/addons/checkout', 'ocean-extra/assets/css/woo', '/plugins/elementor/assets/', '/plugins/elementor-pro/assets/', '/uploads/elementor/css/', '/plugins/elementskit-lite/', '/plugins/royal-elementor-addons/', ) ); -
/** * Callbacks on woocommerce_before_checkout_form the classic takeover removes: * 'Class::method' (static or instance) or function names. */ apply_filters( 'opcw_drop_checkout_form_callbacks', array( 'OceanWP_WooCommerce_Config::checkout_timeline' ) ); -
/** * The wording of a zero-cost shipping price, e.g. "Gratis" instead of the * translated "Free" (de_CH: "Kostenlos"). */ apply_filters( 'opcw_free_label', $label, $context ); -
/** * The browser config of the effective provider. A provider other than `own` * fills `geo`; its values are public (page-cached shells). */ apply_filters( 'opcw_geo_config', $cfg, $provider ); -
/** * This filter is documented in docs/HOOKS.md (both editions since 4.3). */ apply_filters( 'opcw_geo_endpoint', $url ); -
/** * The rating in the checkout header (both engines; the thank-you page shares * the header part). */ apply_filters( 'opcw_header_rating', null, $context ); -
/** * The shop's contact details (help box, contact dialog, "Contact" link). */ apply_filters( 'opcw_help_contact', $contact ); -
/** * The plugin booted (WooCommerce present, no 3.x copy active). Runs at * plugins_loaded:20; add-ons start their runtime hooks here. */ do_action( 'opcw_loaded' ); -
/** * The payment gateway ids the thank-you page treats as offline (paid outside * the checkout): their payment line shows the amount, never "charged", and "Β· * payment pending" while the order waits for the money (on-hold / pending). * Gateway classes extending WooCommerce's BACS / cheque / COD count without * being listed. */ apply_filters( 'opcw_offline_gateways', self::OFFLINE_GATEWAYS, $order ); -
/** * The one-click offer above the payment methods: core's pick among * `opcw_order_bump_offers` (null when none), or a theme's own offer. */ apply_filters( 'opcw_order_bump', $pick ); -
/** * Show the offer on this request? Site themes switch it off here (both * engines). */ apply_filters( 'opcw_order_bump_enabled', true, $offer ); -
/** * The offers the card may show, in priority order (4.7). Core shows one at a * time: the one the card added, else the first not in the cart. */ apply_filters( 'opcw_order_bump_offers', array(), $cart ); -
/** * Whether a checkout field carries the password managers' ignore attributes * (data-1p-ignore / data-lpignore / data-bwignore). Both engines; a field's * `custom_attributes` still win in the classic one. */ apply_filters( 'opcw_password_manager_ignore', $ignore, (string) $key, $field ); -
/** * The "Total" row above the pay button (classic engine; Block Mode renders the * same markup from the Store API). Return '' to remove the row. */ apply_filters( 'opcw_pay_total_html', $html, WC()->cart ); -
/** * Whether a payment gateway's description renders inside its row, like a * shipping rate's (no `payment_box`, no slide), or in WooCommerce's box below * the row. */ apply_filters( 'opcw_payment_description_inline', (bool) $inline, $gateway, (string) $html, (string) $engine ); -
/** * Whether a payment gateway shows without "More payment options". */ apply_filters( 'opcw_payment_gateway_primary', true, $gateway, $position ); -
/** * Whether our checkout chooses WooCommerce's free_shipping rate for this * package now (it just became available, or nothing is chosen). */ apply_filters( 'opcw_prefer_free_shipping', true, $free, $now, $package ); -
/** * Attributes that keep session recorders from capturing personal data on the * thank-you page (greeting, sub-line, address cards). */ apply_filters( 'opcw_private_attributes', array( 'data-clarity-mask' => 'true', 'data-hj-suppress' => '', ) ); -
/** * The largest quantity a shopper can set on a cart line in the order summary's * editable cart, both engines: typed or with + (clamped and announced in the * browser, clamped again on the server). Not the product's own limit: it never * raises that one. */ apply_filters( 'opcw_qty_max', $limit > 0 ? $limit : self::QTY_CAP, $product, $item ); -
/** * Whether a classic checkout field runs through WooCommerce's field filters * (woocommerce_form_field_args, woocommerce_form_field_{type}, * woocommerce_form_field), as woocommerce_form_field() runs them. */ apply_filters( 'opcw_render_wc_field_filters', true, (string) $key, $args ); -
/** * Print markup inside a checkout section, right after its heading * (`.opcw-section__head`); for shipping outside the live-updated * `.opcw-ship-live` part. */ do_action( 'opcw_section_after_head', $section, $ctx ); -
/** * Register more default texts that follow the shop language: settings key => * array( English msgid => __( msgid, your text domain ) ). A stored value * equal to the msgid or its translation in the saving request's language is * stored as the msgid and rendered translated. */ apply_filters( 'opcw_settings_default_texts', $texts ); -
/** * Register add-on setting keys (and their defaults) in the core option. */ apply_filters( 'opcw_settings_defaults', $core ); -
/** * Sanitize add-on keys (registered via `opcw_settings_defaults`). */ apply_filters( 'opcw_settings_sanitize', $out, $in, $stored ); -
/** * After the settings form was saved: new + previous option (merged over * defaults) and the tab id. */ do_action( 'opcw_settings_saved', $new, $old, $tab ); -
/** * Whether a shipping rate shows without "More shipping options". */ apply_filters( 'opcw_shipping_rate_primary', true, $rate, $position, is_numeric( $index ) ? (int) $index : $index, $package ); -
/** * The OnePageCheckout rows of Site Health β Info (and WooCommerce β * Status). */ apply_filters( 'opcw_site_health_fields', $fields ); -
/** * The sticky header on the checkout (both engines). */ apply_filters( 'opcw_sticky_header', false ); -
/** * Height-aware order summary on the checkout (both engines) and the thank-you * page. */ apply_filters( 'opcw_summary_fit', true ); -
/** * Perks under the order summary. */ apply_filters( 'opcw_summary_perks', array( 'rows' => array(), 'style' => 'list', 'title' => '', ) ); -
/** * Progress shown in the order summary. */ apply_filters( 'opcw_summary_progress', null, $cart ); -
/** * Under the hero (and the retry actions of a failed order): order progress, * highlights. Classic-only page (Block Mode never serves order-received). */ do_action( 'opcw_thankyou_after_hero', $opcw_order ); -
/** * In the order aside, below the totals and perks: trust panel, next steps. */ do_action( 'opcw_thankyou_aside', $opcw_order ); -
/** * How the order reaches the shopper on the thank-you page. */ apply_filters( 'opcw_thankyou_fulfilment', $type, $order ); -
/** * The line under the payment method title on the thank-you page. */ apply_filters( 'opcw_thankyou_payment_note', $html, $order, $kind ); -
/** * The order progress steps of the thank-you page (the pro tracker). */ apply_filters( 'opcw_thankyou_steps', $steps, $order, $type ); -
/** * The thank-you hero sub-line (inline HTML), before WooCommerce's * `woocommerce_thankyou_order_received_text`. Return '' for none. */ apply_filters( 'opcw_thankyou_subline', $html, $order, $type ); -
/** * CSS selectors of theme overlays the takeover hides (display: none) on the * checkout and thank-you pages while the theme CSS is dropped. */ apply_filters( 'opcw_theme_overlay_selectors', array( '#ast-scroll-top', '#scroll-to-top.scroll-to-top', '#owp-qv-wrap', '#oceanwp-cart-sidebar-wrap', '.owp-cart-overlay', '#dark-mode-toggler', ) ); -
woocommerce_blocks_enqueue_checkout_block_scripts_after
action Used by 2 plugins β Copy link Customise this hook/** * This action is documented in woocommerce/src/Blocks/BlockTypes/Checkout.php */ do_action( 'woocommerce_blocks_enqueue_checkout_block_scripts_after' ); -
woocommerce_blocks_enqueue_checkout_block_scripts_before
action Used by 2 plugins β Copy link Customise this hook/** * This action is documented in woocommerce/src/Blocks/BlockTypes/Checkout.php */ do_action( 'woocommerce_blocks_enqueue_checkout_block_scripts_before' ); -
apply_filters( 'opcw_keep_style_pattern', '/opcw|onepagecheckout/i' ); -
apply_filters( 'opcw_disable_selectwoo', true ); -
apply_filters( 'opcw_takeover_checkout', OPCW_Coexist::own_form_posted() ); -
do_action( 'woocommerce_before_checkout_form', $opcw_checkout ); -
apply_filters( 'woocommerce_cart_item_product', $item['data'], $item, $key ); -
do_action( 'woocommerce_check_cart_items' ); -
woocommerce_thankyou_order_received_text
filter Used by 45 plugins β Copy link Customise this hookapply_filters( 'woocommerce_thankyou_order_received_text', $html, $order ); -
apply_filters( 'wpml_active_languages', null, array( 'skip_missing' => 0 ) ); -
apply_filters( 'opcw_active', $enabled ); -
apply_filters( 'opcw_admin_tabs', $core ); -
apply_filters( 'opcw_back_to_shop_label', __( 'Back to shop', 'trafficflow-onepagecheckout' ) ); -
apply_filters( 'opcw_billing_same_default', $same, $customer ); -
apply_filters( 'opcw_contact_field_keys', array( 'billing_email' ) ); -
apply_filters( 'opcw_contact_relocated_fields', $keys, $billing ); -
apply_filters( 'opcw_dedupe_shipping_phone', $dedupe ); -
do_action( 'opcw_express_buttons' ); -
apply_filters( 'opcw_field_pairs', array( 'first_name' => array( 'last_name', 'opcw-row--2' ), 'postcode' => array( 'city', 'opcw-row--plz' ), ) ); -
apply_filters( 'opcw_keep_script_pattern', '/opcw|onepagecheckout|^wc-|^woocommerce|^jquery|^selectWoo|^select2/i' ); -
apply_filters( 'opcw_order_button_text', apply_filters( 'woocommerce_order_button_text', OPCW_Settings::pay_button_label() ) ); -
apply_filters( 'opcw_shipping_extra_billing_keys', $keys ); -
apply_filters( 'opcw_shipping_fallback_to_billing', $default, $customer ); -
apply_filters( 'opcw_shipping_rate_label', $opcw_rate->get_label(), $opcw_rate ); -
apply_filters( 'opcw_takeover_checkout_blocks', $scope ); -
apply_filters( 'opcw_takeover_thankyou', true ); -
apply_filters( 'opcw_toggle_companions', array() ); -
apply_filters( 'opcw_toggled_field_keys', array( 'shipping_address_2', 'shipping_company', 'billing_address_2', 'billing_company' ) ); -
apply_filters( 'opcw_translate_string', $value, $name ); -
apply_filters( 'opcw_vat_field_keys', array( 'vat_number', 'billing_vat_number', 'billing_eu_vat_number', 'woocommerce_eu_vat_number' ) ); -
do_action( 'woocommerce_after_checkout_billing_form', $opcw_checkout ); -
do_action( 'woocommerce_after_checkout_form', $opcw_checkout ); -
woocommerce_after_checkout_registration_form
action Used by 44 plugins β Copy link Customise this hookdo_action( 'woocommerce_after_checkout_registration_form', $opcw_checkout ); -
woocommerce_after_checkout_shipping_form
action Used by 48 plugins β Copy link Customise this hookdo_action( 'woocommerce_after_checkout_shipping_form', $opcw_checkout ); -
do_action( 'woocommerce_after_order_notes', $opcw_checkout ); -
do_action( 'woocommerce_after_shipping_rate', $opcw_rate, $opcw_i ); -
woocommerce_before_checkout_billing_form
action Used by 51 plugins β Copy link Customise this hookdo_action( 'woocommerce_before_checkout_billing_form', $opcw_checkout ); -
woocommerce_before_checkout_form_cart_notices
action Used by 9 plugins β Copy link Customise this hookdo_action( 'woocommerce_before_checkout_form_cart_notices' ); -
woocommerce_before_checkout_registration_form
action Used by 44 plugins β Copy link Customise this hookdo_action( 'woocommerce_before_checkout_registration_form', $opcw_checkout ); -
woocommerce_before_checkout_shipping_form
action Used by 47 plugins β Copy link Customise this hookdo_action( 'woocommerce_before_checkout_shipping_form', $opcw_checkout ); -
do_action( 'woocommerce_before_order_notes', $opcw_checkout ); -
do_action( 'woocommerce_before_thankyou', $opcw_order->get_id() ); -
apply_filters( 'woocommerce_cart_item_name', $opcw_product->get_name(), $opcw_cart_item, $opcw_cart_item_key ); -
apply_filters( 'woocommerce_cart_item_price', $opcw_cart->get_product_price( $opcw_product ), $opcw_cart_item, $opcw_cart_item_key ); -
apply_filters( 'woocommerce_cart_item_subtotal', $opcw_cart->get_product_subtotal( $opcw_product, $opcw_qty ), $opcw_cart_item, $opcw_cart_item_key ); -
woocommerce_checkout_after_customer_details
action Used by 67 plugins β Copy link Customise this hookdo_action( 'woocommerce_checkout_after_customer_details' ); -
woocommerce_checkout_before_customer_details
action Used by 67 plugins β Copy link Customise this hookdo_action( 'woocommerce_checkout_before_customer_details' ); -
apply_filters( 'woocommerce_checkout_cart_item_quantity', ' <strong class="product-quantity">' . sprintf( '× %s', $opcw_qty ) . '</strong>', $opcw_cart_item, $opcw_cart_item_key ); -
woocommerce_checkout_must_be_logged_in_message
filter Used by 67 plugins β Copy link Customise this hookapply_filters( 'woocommerce_checkout_must_be_logged_in_message', __( 'You must be logged in to checkout.', 'woocommerce' ) ); -
woocommerce_create_account_default_checked
filter Used by 51 plugins β Copy link Customise this hookapply_filters( 'woocommerce_create_account_default_checked', false ); -
apply_filters( 'woocommerce_enable_order_notes_field', 'yes' === get_option( 'woocommerce_enable_order_comments', 'yes' ) ); -
apply_filters( 'woocommerce_form_field', $html, $key, $args, $value ); -
apply_filters( "woocommerce_form_field_{$type}", $html, $key, $args, $value ); -
apply_filters( 'woocommerce_form_field_args', self::wc_field_args( $key, $args ), $key, $value ); -
apply_filters( 'woocommerce_local_pickup_methods', array( 'legacy_local_pickup', 'local_pickup' ) ); -
apply_filters( 'woocommerce_order_button_text', OPCW_Settings::pay_button_label() ); -
apply_filters( 'woocommerce_order_item_name', $opcw_item->get_name(), $opcw_item, false ); -
woocommerce_order_received_verify_known_shoppers
filter Used by 23 plugins β Copy link Customise this hookapply_filters( 'woocommerce_order_received_verify_known_shoppers', true ); -
apply_filters( 'woocommerce_shipping_package_name', sprintf( __( 'Shipment %d', 'trafficflow-onepagecheckout' ), $opcw_i + 1 ), $opcw_i, $opcw_package ); -
do_action( 'woocommerce_thankyou', $opcw_order->get_id() ); -
do_action( "woocommerce_thankyou_{$opcw_order->get_payment_method()}", $opcw_order->get_id() ); -
apply_filters( 'wpml_object_id', $page_id, 'page', false, $lang );
Generated from TrafficFlow OnePageCheckout for WooCommerce'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: