PDFDraft PDF Invoices for WooCommerce 1.0 has 12 actions and 21 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 PDFDraft PDF Invoices for WooCommerce fires an action
add_action( 'pdfdraft_pdf_invoices_for_woocommerce_order_details_invoice_action', function( $order ) {
// Your code runs here.
}, 10, 1 );
// Change a value PDFDraft PDF Invoices for WooCommerce is about to use
add_filter( 'pdfdraft_woocommerce_settings_sections', function( $sections ) {
// Change $sections here.
return $sections;
}, 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
-
pdfdraft_pdf_invoices_for_woocommerce_order_details_invoice_action
action Copy link Customise this hook/** * Output PDFDraft invoice control (same markup as admin order screen). */ do_action( 'pdfdraft_pdf_invoices_for_woocommerce_order_details_invoice_action', $order ); -
/** * Filter the list of settings sections shown in the WooCommerce PDF settings * sidebar. */ apply_filters( 'pdfdraft_woocommerce_settings_sections', $this->sections ); -
/** * Action hook fired after the order details. */ do_action( 'woocommerce_after_order_details', $order ); -
apply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_settings_option_key', 'pdfdraft_pdf_invoices_for_woocommerce_settings' ); -
pdfdraft_pdf_invoices_for_woocommerce_invoice_download_button_args
filter Copy link Customise this hookapply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_invoice_download_button_args', $args, $order ); -
apply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_invoice_download_url', $download_url, $order_id ); -
apply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_format_address', $formatted, $address, $context ); -
pdfdraft_pdf_invoices_for_woocommerce_invoice_download_script_localize
filter Copy link Customise this hookapply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_invoice_download_script_localize', $data ); -
apply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_store_logo_url', '', $custom_logo_id ); -
do_action( 'pdfdraft_pdf_invoices_for_woocommerce_after_delete_invoice', $order, $request ); -
do_action( 'pdfdraft_pdf_invoices_for_woocommerce_after_save_invoice', $order, $result, $request ); -
do_action( 'pdfdraft_pdf_invoices_for_woocommerce_after_serve_invoice', $order, $request ); -
do_action( 'pdfdraft_pdf_invoices_for_woocommerce_before_delete_invoice', $order, $request ); -
do_action( 'pdfdraft_pdf_invoices_for_woocommerce_before_save_invoice', $order, $request ); -
do_action( 'pdfdraft_pdf_invoices_for_woocommerce_before_serve_invoice', $order, $request ); -
pdfdraft_pdf_invoices_for_woocommerce_invoice_delete_capability
filter Copy link Customise this hookapply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_invoice_delete_capability', 'manage_woocommerce', $order, $request ); -
pdfdraft_pdf_invoices_for_woocommerce_invoice_download_capability
filter Copy link Customise this hookapply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_invoice_download_capability', 'manage_woocommerce', $order, $request ); -
apply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_invoice_filename', $fallback, $order ); -
apply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_invoice_generation_mode', $generation_mode, $saved_settings ); -
apply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_invoice_max_upload_size', 10 * 1024 * 1024 ); -
pdfdraft_pdf_invoices_for_woocommerce_invoice_merge_tag_context
filter Copy link Customise this hookapply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_invoice_merge_tag_context', $merge_tags, $order ); -
pdfdraft_pdf_invoices_for_woocommerce_invoice_order_item_merge_tags
filter Copy link Customise this hookapply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_invoice_order_item_merge_tags', $item_merge_tags, $item, $order ); -
pdfdraft_pdf_invoices_for_woocommerce_invoice_order_items_merge_tags
filter Copy link Customise this hookapply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_invoice_order_items_merge_tags', $order_items, $order ); -
apply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_invoice_save_capability', 'manage_woocommerce', $order, $request ); -
pdfdraft_pdf_invoices_for_woocommerce_invoice_show_delete_button
filter Copy link Customise this hookapply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_invoice_show_delete_button', true, $order ); -
apply_filters( 'pdfdraft_pdf_invoices_for_woocommerce_store_address_string', $formatted, $store_address ); -
apply_filters( 'pdfdraft:woocommerce-invoice-download:localize:scripts', $data ); -
woocommerce_order_details_after_order_table
action Used by 32 plugins → Copy link Customise this hookdo_action( 'woocommerce_order_details_after_order_table', $order ); -
woocommerce_order_details_after_order_table_items
action Used by 25 plugins → Copy link Customise this hookdo_action( 'woocommerce_order_details_after_order_table_items', $order ); -
woocommerce_order_details_before_order_table
action Used by 26 plugins → Copy link Customise this hookdo_action( 'woocommerce_order_details_before_order_table', $order ); -
woocommerce_order_details_before_order_table_items
action Used by 25 plugins → Copy link Customise this hookdo_action( 'woocommerce_order_details_before_order_table_items', $order ); -
woocommerce_purchase_note_order_statuses
filter Used by 32 plugins → Copy link Customise this hookapply_filters( 'woocommerce_purchase_note_order_statuses', array( 'completed', 'processing' ) ); -
apply_filters( 'woocommerce_purchase_order_item_types', 'line_item' );
Generated from PDFDraft PDF Invoices 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: