Warranty Cart 2.2.1 has 45 actions and 68 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 Warranty Cart fires an action
add_action( 'warranty_cart_after_account_warranties', function( $arg1 ) {
// Your code runs here.
}, 10, 1 );
// Change a value Warranty Cart is about to use
add_filter( 'warranty_cart_rest_capability', function( $value, $request ) {
// Change $value here.
return $value;
}, 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
-
/** * The capability an admin endpoint requires. */ apply_filters( 'warranty_cart_rest_capability', 'manage_warranty_cart', $request ); -
/** * Filter admin script handle */ apply_filters( 'warranty_cart_admin_script_handle', 'warranty-admin' ); -
/** * Filter admin style handle */ apply_filters( 'warranty_cart_admin_style_handle', 'warranty-admin' ); -
/** * After the warranties tab. */ do_action( 'warranty_cart_after_account_warranties', false ); -
/** * How many warranties to a page. */ apply_filters( 'warranty_cart_account_warranties_per_page', $stored > 0 ? $stored : 10 ); -
/** * Fires after warranty products are added to the cart. */ do_action( 'warranty_cart_added_to_cart', $added ); -
/** * Filter admin asset dependencies */ apply_filters( 'warranty_cart_admin_asset_dependencies', array_merge( $admin_asset['dependencies'], array( 'jquery' ) ) ); -
/** * Fires after other plugins' notices are cleared from a warranty screen. */ do_action( 'warranty_cart_admin_notices_suppressed' ); -
/** * Action after enqueuing admin assets */ do_action( 'warranty_cart_after_enqueue_admin_assets', $hook ); -
/** * Action after enqueuing frontend assets */ do_action( 'warranty_cart_after_enqueue_frontend_assets' ); -
/** * Action after enqueuing admin assets */ do_action( 'warranty_cart_after_register_admin_assets', $hook ); -
/** * Action after saving checkout fields to order */ do_action( 'warranty_cart_after_save_checkout_fields_to_order', $order, $fields, $field_data ); -
/** * Action after saving warranty product meta */ do_action( 'warranty_cart_after_save_product_meta', $product, $post_id ); -
/** * Action after warranty selector content */ do_action( 'warranty_cart_after_selector_content', $main_warranties, $services, $layout ); -
/** * Action after sending order completion notification */ do_action( 'warranty_cart_after_send_order_completion_notification', $order_id, $order ); -
/** * Action after sending warranty expired notification */ do_action( 'warranty_cart_after_send_warranty_expired', $order_id, $expiration_date ); -
/** * Action after sending warranty reminder */ do_action( 'warranty_cart_after_send_warranty_reminder', $order_id, $expiration_date, $days_remaining ); -
/** * Action after validating checkout fields */ do_action( 'warranty_cart_after_validate_checkout_fields', $fields ); -
/** * Before the warranties tab. */ do_action( 'warranty_cart_before_account_warranties', ! empty( $warranties ) ); -
/** * Action before saving checkout fields to order */ do_action( 'warranty_cart_before_save_checkout_fields_to_order', $order, $fields ); -
/** * Action before saving warranty product meta */ do_action( 'warranty_cart_before_save_product_meta', $product, $post_id ); -
/** * Action before warranty selector content */ do_action( 'warranty_cart_before_selector_content', $main_warranties, $services, $layout ); -
/** * Action before sending order completion notification */ do_action( 'warranty_cart_before_send_order_completion_notification', $order_id, $order ); -
/** * Action before sending warranty expired notification */ do_action( 'warranty_cart_before_send_warranty_expired', $order_id, $expiration_date ); -
/** * Action before sending warranty reminder */ do_action( 'warranty_cart_before_send_warranty_reminder', $order_id, $expiration_date, $days_remaining ); -
/** * Validates the structure and content of a checkout field configuration. */ do_action( 'warranty_cart_before_validate_checkout_fields', $fields ); -
/** * Filter checkout fields for WooCommerce Blocks. */ apply_filters( 'warranty_cart_block_checkout_fields', $fields, $warranty_fields ); -
/** * Which roles may run the warranty side of the shop. */ apply_filters( 'warranty_cart_capability_roles', array( 'administrator', 'shop_manager' ) ); -
/** * Filter modified checkout fields for billing phone requirement. */ apply_filters( 'warranty_cart_checkout_fields_billing_phone', $fields, $require_phone ); -
/** * Filter checkout fields configuration. */ apply_filters( 'warranty_cart_checkout_fields_config', $enabled_fields, $fields ); -
/** * Filter checkout fields section HTML */ apply_filters( 'warranty_cart_checkout_fields_section_html', '<div class="warranty-checkout-fields-section"> <h3>' . esc_html__( 'Warranty Information', 'warranty-cart' ) . '</h3>' . wc_get_template_html( 'checkout/warranty-fields.php', array( 'fields' => $fields, ), '', WARRANTY_CART_PATH . 'templates/' ) . '</div>', $fields ); -
/** * Filters the number of attachments a claim accepts. */ apply_filters( 'warranty_cart_claim_attachment_limit', $configured > 0 ? $configured : 5 ); -
/** * Filters the file types a claim accepts. */ apply_filters( 'warranty_cart_claim_attachment_types', array( 'jpg|jpeg' => 'image/jpeg', 'png' => 'image/png', 'gif' => 'image/gif', 'webp' => 'image/webp', 'heic' => 'image/heic', 'pdf' => 'application/pdf', ) ); -
/** * Fires once a claim has been filed. */ do_action( 'warranty_cart_claim_created', $claim_id, $warranty, $customer_id ); -
/** * Fires once a message has been written on a claim. */ do_action( 'warranty_cart_claim_message_added', $message_id, $claim, $visibility ); -
/** * Filter the claim message email before it is sent. */ apply_filters( 'warranty_cart_claim_message_email', array( 'to' => $recipient, 'subject' => $subject, 'body' => implode( "\n", $lines ), ), $claim, $message ); -
/** * Fires when a claim is given an outcome. */ do_action( 'warranty_cart_claim_outcome_set', $claim_id, $outcome_key, isset( $data['outcome_cost'] ) ? (float) $data['outcome_cost'] : null ); -
/** * Fires when a claim changes status. */ do_action( 'warranty_cart_claim_status_changed', $claim_id, $status, $previous ); -
/** * Filter the claim status email before it is sent. */ apply_filters( 'warranty_cart_claim_status_email', array( 'to' => $recipient, 'subject' => $subject, 'body' => $body, ), $claim ); -
/** * Filter whether a warranty is offered against a product. */ apply_filters( 'warranty_cart_covers_product', $covers, $warranty, $product ); -
/** * Filter the page the warranty selector is displayed on. */ apply_filters( 'warranty_cart_display_page_id', $page_id ); -
/** * Filter whether to enqueue admin assets */ apply_filters( 'warranty_cart_enqueue_admin_assets', true, $hook ); -
/** * Filter whether to enqueue frontend assets */ apply_filters( 'warranty_cart_enqueue_frontend_assets', true ); -
/** * Filter frontend asset dependencies */ apply_filters( 'warranty_cart_frontend_asset_dependencies', array_merge( $frontend_asset['dependencies'], array( 'jquery' ) ) ); -
/** * Filter frontend script handle */ apply_filters( 'warranty_cart_frontend_script_handle', 'warranty-frontend' ); -
/** * Filter frontend script localization data */ apply_filters( 'warranty_cart_frontend_script_localization', array( 'root' => \esc_url_raw( \rest_url() ), 'nonce' => \wp_create_nonce( 'wp_rest' ), 'currency' => \html_entity_decode( \get_woocommerce_currency_symbol(), ENT_QUOTES, 'UTF-8' ), ) ); -
/** * Filter frontend style handle */ apply_filters( 'warranty_cart_frontend_style_handle', 'warranty-frontend' ); -
/** * Filter whether a gateway supports a warranty-related feature. */ apply_filters( 'warranty_cart_gateway_supports', $supported, $feature, $gateway_id, $gateway ); -
/** * Filter whether guests may reach their warranties. */ apply_filters( 'warranty_cart_guest_access_enabled', 'no' !== $enabled ); -
/** * Filter how many failed lookups are allowed per hour. */ apply_filters( 'warranty_cart_guest_attempt_limit', self::ATTEMPT_LIMIT ); -
/** * Filter the product import result data. */ apply_filters( 'warranty_cart_import_products_result', $import_result, $csv_content, $category ); -
/** * Filter the warranties included with a product. */ apply_filters( 'warranty_cart_included_for_product', $included, $product ); -
/** * Filter empty products message */ apply_filters( 'warranty_cart_no_products_message', '<p>' . esc_html__( 'No warranty products found.', 'warranty-cart' ) . '</p>' ); -
/** * Filter the warranties offered against a product. */ apply_filters( 'warranty_cart_offers_for_product', $offers, $product ); -
/** * Filter the WordPress.org author whose plugins this screen lists. */ apply_filters( 'warranty_cart_our_plugins_author', self::AUTHOR ); -
/** * Slugs to leave off the screen. */ apply_filters( 'warranty_cart_our_plugins_skip', array( 'warranty-cart' ) ); -
/** * Action after PDF certificate header */ do_action( 'warranty_cart_pdf_certificate_after_header', $order ); -
/** * Filter PDF certificate arguments */ apply_filters( 'warranty_cart_pdf_certificate_args', $args, $order ); -
/** * Action before PDF certificate header */ do_action( 'warranty_cart_pdf_certificate_before_header', $order ); -
/** * Filter plugin action links */ apply_filters( 'warranty_cart_plugin_action_links', $links ); -
/** * Filter plugin row meta links */ apply_filters( 'warranty_cart_plugin_row_meta', $links ); -
/** * Filter product columns to add */ apply_filters( 'warranty_cart_product_columns', array( 'warranty_type' => \__( 'Warranty Type', 'warranty-cart' ), ) ); -
/** * Filter warranty product meta box data */ apply_filters( 'warranty_cart_product_meta_data', array( 'warranty_status' => $warranty_status, 'product_type' => $product_type, 'warranty_duration' => $warranty_duration, 'warranty_duration_unit' => $warranty_duration_unit, 'coverage_details' => $coverage_details, 'associated_warranty' => $associated_warranty, 'service_priority' => $service_priority, 'main_warranties' => $main_warranties, 'included' => Coverage::is_included( $product ), 'pric... ); -
/** * Filter warranty tab data */ apply_filters( 'warranty_cart_product_warranty_tab', array( 'label' => \__( 'Warranty', 'warranty-cart' ), 'target' => 'warranty_product_data', 'class' => array( 'show_if_simple', 'show_if_variable' ), 'priority' => 60, ) ); -
/** * Filter registered warranty emails. */ apply_filters( 'warranty_cart_registered_emails', $emails, $email_classes ); -
/** * Fires after a renewal is added to the cart. */ do_action( 'warranty_cart_renewal_added_to_cart', $warranty_id, $customer_id, $key ); -
/** * Filter orders REST API arguments. */ apply_filters( 'warranty_cart_rest_orders_args', $args ); -
/** * Filter orders query arguments */ apply_filters( 'warranty_cart_rest_orders_query_args', array( 'limit' => $per_page, 'page' => $page, 'orderby' => 'date', 'order' => 'DESC', ), $request ); -
/** * Filter orders REST response data */ apply_filters( 'warranty_cart_rest_orders_response', $response_data, $request ); -
/** * Filter reports REST API arguments. */ apply_filters( 'warranty_cart_rest_reports_args', $args ); -
/** * Filter reports query arguments */ apply_filters( 'warranty_cart_rest_reports_query_args', $query_args, $date_range ); -
/** * Filter reports response data */ apply_filters( 'warranty_cart_rest_reports_response', $reports, $date_range ); -
/** * Filter sales data results */ apply_filters( 'warranty_cart_sales_data', $sales_data, $date_range ); -
/** * Filter sales data query arguments */ apply_filters( 'warranty_cart_sales_data_date_filter', $date_filter, $date_params, $date_range ); -
/** * Filter the sales report data. */ apply_filters( 'warranty_cart_sales_report_data', $report_data, $period, $days ); -
/** * Filter warranty selector arguments */ apply_filters( 'warranty_cart_selector_args', $args ); -
/** * Fires when a warranty's serial number is set or cleared. */ do_action( 'warranty_cart_serial_registered', $warranty_id, $serial ); -
/** * Filter the specific plugin setting value. */ apply_filters( 'warranty_cart_setting', $value, $key, $default_value ); -
/** * Filter the plugin settings. */ apply_filters( 'warranty_cart_settings', $settings ); -
/** * Filter shortcode attributes */ apply_filters( 'warranty_cart_shortcode_atts', $atts ); -
/** * Filter shortcode output */ apply_filters( 'warranty_cart_shortcode_output', $output, $products, $atts ); -
/** * Filter warranty products for shortcode */ apply_filters( 'warranty_cart_shortcode_products', $products, $args ); -
/** * Filter warranty products query arguments */ apply_filters( 'warranty_cart_shortcode_products_query', array( 'limit' => - 1, 'meta_query' => array( array( 'key' => '_warranty_cart_product_status', 'value' => 'enabled', 'compare' => '=', ), array( 'key' => '_warranty_cart_product_type', 'value' => array( 'main_warranty', 'additional_service' ), 'compare' => 'IN', ), ), ) ); -
/** * Filter whether assets should be enqueued on current page */ apply_filters( 'warranty_cart_should_enqueue_frontend_assets', null, $post ); -
/** * Fires once a warranty has been voided. */ do_action( 'warranty_cart_warranty_cancelled', $warranty_id, $reason ); -
/** * Fires once a warranty has been issued by hand. */ do_action( 'warranty_cart_warranty_issued', $warranty_id, $args ); -
/** * Filter warranty orders results */ apply_filters( 'warranty_cart_warranty_orders', $warranty_orders, $args ); -
/** * Filter the resolved price of a warranty. */ apply_filters( 'warranty_cart_warranty_price', $price, $warranty, $covered ); -
/** * Filter warranty product IDs query arguments */ apply_filters( 'warranty_cart_warranty_product_ids_query_args', $query_args, $args ); -
/** * Filter warranty products query arguments */ apply_filters( 'warranty_cart_warranty_products_query_args', $query_args, $args ); -
do_action( 'woocommerce_email_header', $email_heading, $email ); -
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text ); -
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text ); -
do_action( 'warranty_cart_activated' ); -
do_action( 'warranty_cart_deactivated' ); -
apply_filters( 'warranty_cart_email_classes', $email_classes ); -
apply_filters( 'warranty_cart_pdf_accent_colour', '#1d4ed8', $order ); -
do_action( 'warranty_cart_product_options_warranty' ); -
apply_filters( 'warranty_cart_reminder_days', (int) \get_option( 'warranty_cart_reminder_days', 30 ) ); -
apply_filters( 'warranty_cart_rest_controllers', $this->controllers ); -
do_action( 'warranty_cart_warranties_created', $order, $created_warranties, $source ); -
do_action( 'warranty_cart_warranty_created', $warranty_id, $warranty_data, $order ); -
do_action( 'warranty_cart_warranty_expired', $warranty ); -
do_action( 'warranty_cart_warranty_reminder_sent', $warranty ); -
do_action( 'warranty_cart_warranty_renewed', $warranty_id, $warranty, $new_expiration );
Generated from Warranty Cart'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: