Skip to content

Hooks & filters

In this page you will learn which actions and filters the framework fires, what each one receives and which page explains it, so that you can find the right extension point without reading the framework source.

Every row has the hook name, its type, the arguments in the order they are passed, and a short purpose. Hooks that are specific to a plugin carry a placeholder in their name. Replace it with your own value.

PlaceholderReplace it withExample
{id}The plugin ID, as written in the loader definition.my-carrier
{id_underscored}The plugin ID with dashes turned into underscores.my_carrier
{api_id}The ID of the API client. By default this is the plugin ID.my-carrier
{identifier}The identifier of a background job handler: its $prefix, an underscore and its $action.my_carrier_export_jobs
{prefix}The $hook_prefix given to a shipping handler’s constructor, followed by an underscore. Leave it out, with its underscore, when the prefix is empty.my-carrier_
{method_id}The ID of a shipping method class.my_carrier_courier

A few rules apply to all hooks in this page:

  • Return the type the filter expects. Many filters check what you return and keep the original value when it is the wrong type, but not all do: some cast the result (a bool filter treats the string 'false' as true). Never rely on a wrong-type return being ignored. Return the same type you were given.
  • Add your callbacks early. Register them from init_plugin() or from plugins_loaded, not from a later action. Registries such as the tools and location providers read their filter once.
  • Keep hot-path callbacks cheap. Filters that run for every order row, every rate or every pickup point on a map must not call a remote service.

A filter receives a value and must return one. This one shortens the rate cache for every method of the shop to two minutes:

<?php
add_filter(
'woodev_shipping_rate_cache_ttl',
static function ( $ttl, $method, $package ) {
return 120;
},
10,
3
);

An action receives data and returns nothing. This one adds an order note after a shipment of the plugin with the hook prefix my-carrier_ is exported:

<?php
add_action(
'woodev_shipping_my-carrier_shipment_exported',
static function ( $order, $carrier_order_id ) {
$order->add_order_note(
sprintf(
/* translators: %s: the carrier's order number. */
__( 'Sent to the carrier as order %s.', 'my-carrier' ),
$carrier_order_id
)
);
},
10,
2
);

Pass the number of arguments as the fourth argument of add_filter() or add_action(). WordPress passes only one argument unless you ask for more.

These hooks follow the life of your plugin on a site. See Lifecycle & upgrades and The plugin class.

HookTypeArgumentsUse it toExplained in
woodev_plugins_loadedactionnoneRun code once, after every Woodev plugin on the site has started.The plugin class
woodev_{id}_installedactionnoneReact to the first install of your plugin on a site.Lifecycle & upgrades
woodev_{id}_updatedaction$installed_versionReact to an upgrade. The argument is the version the site had before.Lifecycle & upgrades
woodev_{id}_activatedactionnoneRun when the plugin is activated.Lifecycle & upgrades
woodev_{id}_deactivatedactionnoneRun when the plugin is deactivated.Lifecycle & upgrades
woodev_{id}_milestone_reachedaction$id, $message, $sinceTrigger a milestone notice by firing the action, instead of calling the lifecycle handler. You fire this one; the framework listens.Lifecycle & upgrades
woodev_{id}_milestone_messagefilter$message, $idReword or suppress a milestone notice. Return an empty string to hide it.Lifecycle & upgrades
woodev_{id}_scripts_optimization_pluginsfilter$pluginsChange the list of script-optimisation plugins that the environment check looks for. Keys are plugin files, values are names.Dependencies & environment checks
woodev_plugin_framework_show_deprecated_hook_noticesfilter$showTurn off the debug notices about deprecated hooks. They show only when WP_DEBUG is on.Migrating from v1
wc_{id}_rest_api_system_status_datafilter$data, $response, $requestAdd your own data to the WooCommerce REST system status response.REST endpoints

These hooks shape the settings screens and the setup wizard. See Typed settings, Setup wizard and Admin notices & messages.

HookTypeArgumentsUse it toExplained in
woodev_{id}_settings_api_setting_typesfilter$setting_types, $settingsAdd your own setting type to the list of valid ones.Typed settings
woodev_{id}_settings_api_control_typesfilter$control_types, $settingsAdd your own control type to the list of valid ones.Typed settings
woodev_{id}_settings_api_setting_control_typesfilter$control_types, $setting_type, $setting, $settingsSay which control types a setting type accepts. Starts as an empty array.Typed settings
woodev_{id}_setup_wizard_stepsfilter$steps, $wizardAdd, remove or reorder wizard steps. The steps are keyed by ID.Setup wizard
woodev_{id}_dismiss_noticeaction$message_id, $user_idReact when a user dismisses one of your admin notices.Admin notices & messages
woodev_shipping_toolsfilter$toolsAdd a Shipping_Tool to the tools section of the shipping settings. Register before init priority 25; the list is read once.Plugin anatomy
woodev_shipping_plugin_settings_{id}_form_fieldsfilter$form_fields, $integrationChange the fields of the shared shipping settings page. {id} is the integration ID.Plugin anatomy
woodev_shipping_integration_{id}_supports_{feature}action$integration, $nameReact when the shared settings integration declares a feature. Dashes in the feature name become underscores.Plugin anatomy
woodev_shipping_integration_{id}_removed_support_{feature}action$integration, $nameReact when the integration drops a feature.Plugin anatomy

These hooks wrap every request an API client sends. See Calling external APIs and Logging & debugging.

HookTypeArgumentsUse it toExplained in
woodev_{api_id}_api_request_performedaction$request_data, $response_data, $apiLog or inspect a finished call. The data is already redacted.Calling external APIs
woodev_{api_id}_api_request_urifilter$uri, $apiChange the address of a request.Calling external APIs
woodev_{api_id}_http_request_argsfilter$args, $apiChange the arguments passed to WordPress: headers, body, timeout.Calling external APIs
woodev_{api_id}_request_timeoutfilter$timeout, $purpose, $apiChange the timeout in seconds. $purpose is rates, reference, export or default.Calling external APIs
woodev_plugin_{id}_api_request_is_cacheablefilter$cacheable, $requestTurn the response cache off for one request.Calling external APIs
woodev_plugin_{id}_api_request_cache_lifetimefilter$lifetime, $requestChange how long a response stays cached.Calling external APIs
woodev_plugin_{id}_api_request_cache_max_bytesfilter$max_bytes, $requestChange the largest response that is cached. Zero or less removes the cap.Calling external APIs
woodev_{id}_api_is_tls_1_2_availablefilter$available, $apiOverride the TLS 1.2 check that some carriers require.Calling external APIs
woodev_api_log_text_secret_param_namesfilter$secret_names, $textAdd the names of credentials that are masked in logged text. Use it when your carrier names a parameter in an uncommon way.Calling external APIs

A job handler fires these hooks under its own {identifier}, so two handlers never share a hook. See Background processing.

HookTypeArgumentsUse it toExplained in
{identifier}_job_createdaction$jobReact when a job is created.Background processing
{identifier}_job_updatedaction$jobReact when a job is saved.Background processing
{identifier}_job_completeaction$jobReact when a job finishes.Background processing
{identifier}_job_failedaction$jobReact when a job is marked failed.Background processing
{identifier}_job_deletedaction$jobReact after a job is deleted.Background processing
{identifier}_new_job_attrsfilter$attrs, $job_idChange the attributes of a new job.Background processing
{identifier}_returned_jobfilter$jobChange a job as it is read from the database.Background processing
{identifier}_default_time_limitfilter$secondsChange the time limit of one run. The default is 20.Background processing
{identifier}_time_exceededfilter$exceededOverride the time check.Background processing
{identifier}_memory_exceededfilter$exceededOverride the memory check.Background processing
{identifier}_queue_lock_timefilter$secondsChange how long a run holds the lock.Background processing
{identifier}_cron_intervalfilter$minutesChange the health-check interval.Background processing
{identifier}_batch_handler_items_per_batchfilter$items_per_batchChange how many items one browser-driven request processes.Background processing
{identifier}_batch_handler_js_argsfilter$args, $handlerChange the arguments passed to the batch handler’s JavaScript.Background processing

These hooks run while a shipping method prices a package and while a plugin registers its methods. See Methods & rates and Method features.

HookTypeArgumentsUse it toExplained in
woodev_shipping_method_before_calculate_shippingaction$package, $methodRun code before a method starts to price a package.Methods & rates
woodev_shipping_method_pre_calculate_ratefilter$rate, $package, $methodAnswer with a stored Shipping_Rate and skip the carrier call. Start from null.Methods & rates
woodev_shipping_method_calculated_ratefilter$rate, $package, $methodChange the rate before it is added. Return null to add no rate.Methods & rates
woodev_shipping_method_before_add_rateaction$rate, $package, $methodRun code just before a rate is added.Methods & rates
woodev_shipping_method_after_add_rateaction$rate, $package, $methodRun code just after a rate is added.Methods & rates
woodev_shipping_method_after_calculate_shippingaction$package, $rate, $methodRun code after pricing ends. $rate is null when no rate was added.Methods & rates
woodev_shipping_method_rate_calculation_failedaction$exception, $package, $methodAdd your own fallback, such as a flat rate, when the carrier call fails. The method is already hidden for that package.Methods & rates
woodev_shipping_{method_id}_is_availablefilter$is_available, $package, $methodChange whether the method is offered for a package. Return a bool.Methods & rates
woodev_shipping_method_{method_id}_form_fieldsfilter$form_fields, $methodChange the instance settings fields of a method.Methods & rates
woodev_shipping_method_{method_id}_supports_{feature}action$method, $nameReact when the method declares a feature. Dashes in the feature name become underscores.Method features
woodev_shipping_resolved_servicesfilter$services, $method, $subjectAdd or drop additional services before they reach the carrier. An entry is code, name and parameter; an entry without a code is dropped.Method features
woodev_shipping_insurance_cod_gatewaysfilter$gateway_ids, $methodSay which payment gateway IDs count as cash on delivery for insurance. The default is cod.Method features
woodev_shipping_rate_cache_enabledfilter$enabled, $method, $packageTurn the rate cache off for a method or package.Methods & rates
woodev_shipping_rate_cache_ttlfilter$ttl, $method, $packageChange how long a rate is cached. The default is 600 seconds; zero or less turns the cache off.Methods & rates
woodev_shipping_rate_cache_key_partsfilter$parts, $method, $packageAdd what changes the answer but is not in the cache key. Parts must be plain data.Methods & rates
woodev_shipping_rate_additional_infofilter$blocks, $rate, $method, $index, $pluginAdd or remove the blocks drawn under a rate on the order form. The blocks are keyed by name and echoed as HTML, so escape your own.Methods & rates
woodev_shipping_plugin_before_register_methodaction$method_id, $class, $pluginRun code before a method class is registered.Plugin anatomy
woodev_shipping_plugin_after_register_methodaction$method_id, $class, $pluginRun code after a method class is registered.Plugin anatomy
woodev_shipping_plugin_method_classesfilter$method_classes, $pluginChange the list of method classes before registration.Plugin anatomy
woodev_shipping_plugin_registered_methodsfilter$methods, $pluginChange the final list of registered methods.Plugin anatomy
woodev_shipping_plugin_{id_underscored}_accepted_currenciesfilter$currencies, $pluginChange the currency codes the plugin accepts.Plugin anatomy
woodev_shipping_plugin_{id_underscored}_accepted_countriesfilter$countries, $pluginChange the country codes the plugin accepts.Plugin anatomy
woodev_shipping_method_{method_id}_system_status_startaction$methodAdd rows at the start of the method’s block on the WooCommerce status page.Plugin anatomy
woodev_shipping_method_{method_id}_system_status_endaction$methodAdd rows at the end of that block.Plugin anatomy

These hooks belong to the location layer: the typeahead at checkout and the providers behind it. See Location & checkout fields.

HookTypeArgumentsUse it toExplained in
woodev_location_providersfilter$providersAdd your own Location_Provider objects. Entries that do not implement the interface are rejected.Location & checkout fields
woodev_location_active_providerfilter$provider, $active_idReplace the provider chosen for a request. Return a Location_Provider or null.Location & checkout fields
woodev_location_provider_for_levelfilter$provider, $level, $countryChoose the provider that answers one suggestion level, such as city or street.Location & checkout fields
woodev_location_default_countryfilter$countryChange the country used when the shopper has not chosen one.Location & checkout fields
woodev_location_geoip_country_mismatchfilter$result, $record, $countryOverride what happens when a located record is in a different country than the shopper’s. $result starts as null; return a Location_Record to use it, or leave null to refuse the record.Location & checkout fields
woodev_location_region_ancestor_cache_ttlfilter$ttlChange how long region lookups are cached. The default is one day.Location & checkout fields
woodev_location_resolution_cache_ttlfilter$ttlMake cached resolutions expire after this many seconds. The default 0 never expires them.Location & checkout fields
woodev_location_i18nfilter$stringsReword the typeahead’s text, for example when your carrier calls a locality something else.Location & checkout fields
woodev_customer_location_savedaction$record, $implicit, $user_idReact when a shopper’s location is stored. $implicit is true for a guess, and $user_id is 0 for a guest.Location & checkout fields
woodev_customer_location_forgottenaction$user_idReact when a stored location is erased.Location & checkout fields
woodev_customer_location_ttl_secondsfilter$ttlChange how long a stored location lives. Return null to keep it for good, or a positive number of seconds.Location & checkout fields
woodev_customer_location_export_rawfilter$raw, $record, $user_idClean the provider’s raw answer before it goes into a WordPress privacy export. Return null to leave it out.Location & checkout fields
woodev_location_popular_settlement_list_capfilter$capChange how many popular localities are kept per provider. The default is 30.Location & checkout fields
woodev_location_popular_settlement_ttl_secondsfilter$secondsChange how long a locality stays on the popular list after its last use. The default is two months.Location & checkout fields
woodev_location_popular_settlement_verify_ttl_secondsfilter$secondsChange how long a locality is trusted before it is checked again. The default is two weeks.Location & checkout fields
woodev_location_provider_operation_failedaction$provider_id, $operation, $exceptionLog a provider failure that the REST route turned into a 502. $operation is suggest or list. The exception is raw, so redact it before you log it.Location & checkout fields
woodev_location_provider_countriesfilter$countriesWiden or narrow the countries the bundled DaData provider reports. The default is RU, BY, KZ, UZ, AM, AZ, KG, TJ and TM.Location & checkout fields
woodev_location_dadata_languagefilter$language, $localeChoose ru or en for DaData answers. The default follows the site locale.Location & checkout fields
woodev_location_dadata_delivery_ids_cache_ttlfilter$ttl, $foundChange how long a DaData carrier-ID answer is cached.Location & checkout fields
woodev_location_dadata_record_in_language_cache_ttlfilter$ttl, $foundChange how long a translated DaData record is cached.Location & checkout fields
woodev_location_dadata_operation_failedaction$operation, $exceptionLog a DaData call that failed and was handled. $operation is suggest, locate, normalize or map.Location & checkout fields
woodev_rest_rate_limit_client_ipfilter$address, $edge, $forwardedTell the rate limiter of the public shipping REST routes (location, pickup, field sources) which client address to count. Return the verified address when your server sits behind a proxy you control. A value that is not a valid IP address is ignored.Location & checkout fields

These hooks control the pickup-point map and the choice of a point. See Pickup points & maps.

HookTypeArgumentsUse it toExplained in
woodev_shipping_pickup_point_selectablefilter$verdict, $point, $payment_method, $cart_weight, $method_contextChange whether one point can be chosen. Return ['allowed' => bool, 'reason' => string or null]. It runs for every point drawn, so keep it cheap.Pickup points & maps
woodev_shipping_pickup_point_selectionfilter$result, $point, $contextConfirm or correct a chosen point. It runs once per confirmation, so it is the place to call the carrier.Pickup points & maps
woodev_shipping_pickup_point_selectedaction$point, $contextReact after a point is confirmed and allowed.Pickup points & maps
woodev_shipping_pickup_recheck_outage_allows_checkoutfilter$allow, $exception, $plugin_id, $point_idBlock checkout when the carrier is down during the final re-check. The default true lets the order through.Pickup points & maps
woodev_pickup_accent_colorfilter$colorChange the map’s accent colour. Return a hex colour.Pickup points & maps
woodev_pickup_accent_fill_colorfilter$fill_color, $accentChange the fill colour derived from the accent.Pickup points & maps
woodev_pickup_accent_contrast_colorfilter$contrast_color, $accentChange the text colour drawn on that fill.Pickup points & maps
woodev_pickup_map_point_glyphsfilter$glyphs, $plugin_idPick an icon per point type. The built-in values are warehouse and package; you can also return your own SVG markup.Pickup points & maps
woodev_pickup_map_i18nfilter$strings, $plugin_idReword any text the map shows.Pickup points & maps
woodev_pickup_map_search_enabledfilter$enabled, $plugin_idTurn the address search on the map on or off.Pickup points & maps
woodev_pickup_max_accumulated_pointsfilter$max, $plugin_idCap how many points the browser keeps while the shopper pans. The default 0 means no cap.Pickup points & maps
woodev_pickup_distance_unit_systemfilter$unit_system, $plugin_idShow distances in metric or imperial units.Pickup points & maps
woodev_pickup_max_remembered_selectionsfilter$maxChange how many chosen points the session remembers. The default is 20.Pickup points & maps
woodev_shipping_map_fallback_api_keyfilter$keyReplace the fallback Yandex Maps key used when the merchant has not entered one.Pickup points & maps

These hooks cover the managed checkout fields, the block checkout and the payment methods offered with a shipping choice. See Location & checkout fields.

Hooks marked with {prefix} are named woodev_shipping_{prefix}…. With the prefix my-carrier_, checkout_fields becomes woodev_shipping_my-carrier_checkout_fields.

HookTypeArgumentsUse it toExplained in
woodev_shipping_{prefix}checkout_fieldsfilter$checkout_fields, $sectionChange the checkout fields after the managed fields are added.Location & checkout fields
woodev_shipping_{prefix}checkout_field_savedaction$order, $id, $valueReact after one managed field is saved on the order.Location & checkout fields
woodev_shipping_{prefix}checkout_data_savedaction$order, $valuesReact after all managed fields are saved.Location & checkout fields
woodev_shipping_{prefix}checkout_processedaction$order, $valuesReact after posted checkout data is cleaned, checked and saved.Location & checkout fields
woodev_shipping_{prefix}admin_order_savedaction$order, $values, $contextReact after the admin order editor creates or updates an order of this carrier.Location & checkout fields
woodev_shipping_store_api_posted_datafilter$posted, $orderAdd the values a block-checkout order carries for your fields. Key each value by the field ID.Location & checkout fields
woodev_checkout_pickup_slot_fieldsfilter$slots, $fieldsChange which pickup-slot fields the checkout check enforces.Location & checkout fields
woodev_pickup_slot_placementsfilter$placements, $field_id, $plugin_idChoose where the pickup button is placed on the checkout.Location & checkout fields
woodev_checkout_field_policy_restore_invariantsfilter$restore, $fieldsStop the framework from restoring the required address fields on a request. Use it only when your own field manager needs a field optional for one flow.Location & checkout fields
woodev_shipping_field_policy_pickup_method_idsfilter$idsChange which shipping methods hide the address fields. Remove local_pickup to keep the address for WooCommerce’s own pickup.Location & checkout fields
woodev_shipping_available_payment_gatewaysfilter$gateways, $chosen_method, $pickup_pointRemove payment gateways for the chosen method or point, for example cash on delivery at a point that takes no cash.Location & checkout fields
woodev_phone_mask_patternsfilter$patternsChange the phone mask per country. Keys are two-letter country codes, values use # for a digit.Location & checkout fields
woodev_phone_mask_trunk_prefixesfilter$trunk_prefixesChange the national trunk digit per country.Location & checkout fields

These hooks follow a shipment from the orders page to the carrier and back. The {prefix} hooks are named in the same way as in the checkout section. See Orders, export, documents & tracking.

HookTypeArgumentsUse it toExplained in
woodev_shipping_order_export_requestedaction$orderReact just before any carrier’s create call is sent.Orders, export, documents & tracking
woodev_shipping_{prefix}shipment_exportedaction$order, $carrier_order_idReact after an order is exported to your carrier.Orders, export, documents & tracking
woodev_shipping_order_exportedaction$order, $carrier_order_idReact after any carrier’s export. Use it for work that must not depend on one plugin’s prefix.Orders, export, documents & tracking
woodev_shipping_{prefix}shipment_export_failedaction$order, $exceptionReact when an export fails.Orders, export, documents & tracking
woodev_shipping_{prefix}shipment_cancelledaction$order, $carrier_order_idReact after a shipment is cancelled. The stored ID is already cleared, so use the argument.Orders, export, documents & tracking
woodev_shipping_{prefix}shipment_cancel_failedaction$order, $exceptionReact when a cancellation fails.Orders, export, documents & tracking
woodev_shipping_{prefix}tracking_admin_displayaction$history, $orderDraw the tracking history on the admin order screen.Orders, export, documents & tracking
woodev_shipping_{prefix}tracking_frontend_displayaction$history, $orderDraw the tracking history for the shopper.Orders, export, documents & tracking
woodev_shipping_{prefix}webhook_receivedaction$payload, $requestReact to a verified carrier webhook.Orders, export, documents & tracking
woodev_shipping_{prefix}webhook_touches_delivery_statusfilter$touches_status, $payloadSay that a webhook payload is not a delivery-status update.Orders, export, documents & tracking
HookTypeArgumentsUse it toExplained in
woodev_shipping_delivery_status_changedaction$order, $previous_status, $current_status, $providerReact when a carrier’s status change is saved.Orders, export, documents & tracking
woodev_shipping_delivery_status_resolvedfilter$canonical, $raw, $status_mapChange how a raw carrier status maps to the framework’s status. A recorded cancellation cannot be overridden.Orders, export, documents & tracking
woodev_shipping_delivery_sync_timestampfilter$timestamp, $carrier_idChange the time recorded as a carrier’s last status sync.Orders, export, documents & tracking
woodev_shipping_delivery_sync_recordedaction$carrier_id, $timestampReact after a last-sync time is stored.Orders, export, documents & tracking
woodev_shipping_carrier_cost_changedaction$order, $old, $new, $currency, $provider, $componentReact when the carrier changes the delivery cost. WooCommerce totals are not changed.Orders, export, documents & tracking
woodev_shipping_delivery_date_changedaction$order, $date, $window, $kind, $previous, $providerReact when the carrier sets or moves the delivery date.Orders, export, documents & tracking
woodev_shipping_delivery_issueaction$order, $code, $label, $at, $providerReact when the carrier reports a delivery problem.Orders, export, documents & tracking
woodev_shipping_courier_assignedaction$order, $courier, $providerReact when a courier is assigned or changed.Orders, export, documents & tracking
woodev_shipping_shipment_fact_final_statesfilter$states, $providerSay which statuses close a delivery issue for a carrier.Orders, export, documents & tracking
woodev_shipping_shipment_fact_cost_labelsfilter$labelsReword the cost components in order notes.Orders, export, documents & tracking
woodev_shipping_shipment_fact_flagfilter$flag, $kind, $order, $providerDecide whether a change puts the attention flag on an order row.Orders, export, documents & tracking
woodev_shipping_shipment_fact_notefilter$note, $kind, $order, $provider, $eventReword the order note for a change, or return an empty string for no note.Orders, export, documents & tracking
woodev_shipping_delivery_email_placeholdersfilter$placeholders, $order, $providerAdd carrier-specific placeholders to the delivery status email.Orders, export, documents & tracking

The orders page lists a carrier’s orders and offers actions on them. A plugin that serves several carriers checks $provider->get_id() first.

HookTypeArgumentsUse it toExplained in
woodev_shipping_orders_providersfilter$providersChange the list of carriers shown on the orders page.Orders, export, documents & tracking
woodev_shipping_orders_query_argsfilter$args, $carrierChange the wc_get_orders() arguments before the query runs.Orders, export, documents & tracking
woodev_shipping_orders_cpt_query_argsfilter$query, $query_varsChange the query when orders are stored as posts.Orders, export, documents & tracking
woodev_shipping_orders_new_counts_ttlfilter$ttlChange how long the menu badge counts are cached. The default is 60 seconds; zero or less turns the cache off.Orders, export, documents & tracking
woodev_shipping_orders_rowfilter$row, $order, $providerChange a finished row.Orders, export, documents & tracking
woodev_shipping_orders_row_destinationfilter$destination, $order, $providerChange the destination text of a row.Orders, export, documents & tracking
woodev_shipping_order_row_flagsfilter$flags, $order, $providerAdd badges under the tracking number. Each flag has a label and optional tone, title and icon. It runs for every row.Orders, export, documents & tracking
woodev_shipping_orders_previewfilter$preview, $order, $providerChange the order preview.Orders, export, documents & tracking
woodev_shipping_orders_preview_fieldsfilter$fields, $order, $providerAdd lines to the preview. A line has label, value and optional url and tone.Orders, export, documents & tracking
woodev_shipping_order_metabox_fieldsfilter$fields, $order, $providerAdd lines to the order-edit box of an exported order. Same line shape as the preview.Orders, export, documents & tracking
woodev_shipping_order_actionsfilter$actions, $order, $providerDeclare your own actions on an order row.Orders, export, documents & tracking
woodev_shipping_perform_order_actionfilter$result, $action, $order, $provider, $payloadRun one of your own actions. Return Action_Result::success() or Action_Result::failure(). Leave the value alone for actions that are not yours.Orders, export, documents & tracking
woodev_shipping_order_action_field_optionsfilter$options, $order, $action, $field_id, $providerSupply the options of a select field when its dialog opens. Return a list of value and label, or a WP_Error.Orders, export, documents & tracking
woodev_shipping_orders_toolbar_actionsfilter$actionsDeclare buttons above the orders table. Each needs an id and the provider that owns it.Orders, export, documents & tracking
woodev_shipping_orders_toolbar_dialogfilter$dialog, $action_idSupply the dialog of one toolbar action.Orders, export, documents & tracking
woodev_shipping_perform_toolbar_actionfilter$result, $action_id, $order, $provider, $payloadRun a toolbar action for one chosen order.Orders, export, documents & tracking
woodev_shipping_perform_toolbar_row_actionfilter$result, $action_id, $tab_id, $row_id, $row_actionRun a button on a row of a dialog’s list tab.Orders, export, documents & tracking

The payment gateway layer is legacy and has no v2 reference plugin yet. Its hook names are built from the gateway ID, for example wc_payment_gateway_my_gateway_payment_processed. The most useful ones are below; see Payment gateways for the classes behind them.

HookTypeArgumentsUse it to
wc_payment_gateway_{gateway_id}_form_fieldsfilter$form_fields, $gatewayChange the gateway’s settings fields.
wc_payment_gateway_{gateway_id}_order_button_textfilter$text, $gatewayChange the text of the checkout button.
wc_gateway_{gateway_id}_is_availablefilter$is_availableChange whether the gateway is offered.
wc_payment_gateway_{gateway_id}_get_orderfilter$order, $gatewayAdd data to the order object a direct or hosted gateway works on.
wc_payment_gateway_{gateway_id}_process_paymentfiltertrue, $order_id, $gatewayTake over a direct payment by returning a result array.
wc_payment_gateway_{gateway_id}_payment_processedaction$order, $gatewayReact after a payment is approved.
wc_payment_gateway_{gateway_id}_complete_paymentaction$order, $gatewayReact when an order is completed.
wc_payment_gateway_{gateway_id}_refund_processedaction$order, $gatewayReact after a refund succeeds.
wc_payment_gateway_{gateway_id}_add_transaction_dataaction$order, $response, $gatewaySave more data from a transaction response.
wc_payment_gateway_{gateway_id}_held_order_statusfilter$status, $order, $response, $gatewayChange the status given to a held order. The default is on-hold.
wc_payment_gateway_{gateway_id}_payment_tokens_loadedaction$tokens, $handlerReact when a customer’s saved methods are loaded.
wc_payment_gateway_{gateway_id}_payment_method_addedaction$token_id, $user_id, $responseReact when a customer saves a new method.
wc_{gateway_id}_payment_form_startaction$formAdd markup at the start of the payment form.
wc_{gateway_id}_payment_form_endaction$formAdd markup at the end of the payment form.
wc_{id}_my_payment_methods_table_headersfilter$headers, $tableChange the columns of the saved-methods table on My Account. {id} is the plugin ID.
wc_{handler_id}_js_argsfilter$args, $handlerChange the arguments a script handler, such as the payment form, passes to its JavaScript. {handler_id} is the handler’s get_id().