Skip to content

Action Hooks

Amirhossein Hosseinpour edited this page Aug 30, 2024 · 4 revisions

Warning

The content in this documentation, including hook names and usage examples, was generated using AI assistance. While we strive for accuracy, there is a possibility that some information may not be entirely correct. We strongly recommend that developers double-check the hook names and implementation details directly from the source code of the PeproDev Ultimate Invoice plugin.

Tip

How to Verify Hook Names and Details

  1. Clone the Repository:

    • Use git clone https://github.com/peprodev/ultimate-invoice.git to clone the repository to your local environment.
  2. Search for Hooks in the Source Code:

    • Open the repository in your preferred code editor (e.g., VSCode, Sublime Text).
    • Use the search feature (Ctrl + Shift + F in VSCode) and search for do_action to find action hooks or apply_filters to find filter hooks.
    • Review the function and its arguments to ensure correctness.
  3. Make Necessary Adjustments:

    • If you find any discrepancies, feel free to update your implementation accordingly.

If you encounter any issues or have questions, please open an issue on the repository.

Table of Contents

General
Invoice Related
Order Related

General

puiw_printslips_before_create_html

View source

/**
 * Example usage of the `puiw_printslips_before_create_html` hook.
 *
 * @url https://github.com/peprodev/ultimate-invoice/blob/master/include/admin/class-print.php#L1227 View source
 */
function puiw_puiw_printslips_before_create_html($opt, $opts, $order) {
    // Custom code to modify the behavior of puiw printslips before create html.
    return $opt;
}
add_action('puiw_printslips_before_create_html', 'puiw_puiw_printslips_before_create_html', 10, 3);

puiw_printslips_after_create_html

View source

/**
 * Example usage of the `puiw_printslips_after_create_html` hook.
 *
 * @url https://github.com/peprodev/ultimate-invoice/blob/master/include/admin/class-print.php#L1410 View source
 */
function puiw_puiw_printslips_after_create_html($opt, $opts, $order) {
    // Custom code to modify the behavior of puiw printslips after create html.
    return $opt;
}
add_action('puiw_printslips_after_create_html', 'puiw_puiw_printslips_after_create_html', 10, 3);

puiw_printslips_before_return_html

View source

/**
 * Example usage of the `puiw_printslips_before_return_html` hook.
 *
 * @url https://github.com/peprodev/ultimate-invoice/blob/master/include/admin/class-print.php#L1411 View source
 */
function puiw_puiw_printslips_before_return_html($opt, $opts, $order) {
    // Custom code to modify the behavior of puiw printslips before return html.
    return $opt;
}
add_action('puiw_printslips_before_return_html', 'puiw_puiw_printslips_before_return_html', 10, 3);

puiw_printslips_after_return_html

View source

/**
 * Example usage of the `puiw_printslips_after_return_html` hook.
 *
 * @url https://github.com/peprodev/ultimate-invoice/blob/master/include/admin/class-print.php#L1413 View source
 */
function puiw_puiw_printslips_after_return_html($opt, $opts, $order) {
    // Custom code to modify the behavior of puiw printslips after return html.
    return $opt;
}
add_action('puiw_printslips_after_return_html', 'puiw_puiw_printslips_after_return_html', 10, 3);

puiw_printinventory_before_create_html

View source

/**
 * Example usage of the `puiw_printinventory_before_create_html` hook.
 *
 * @url https://github.com/peprodev/ultimate-invoice/blob/master/include/admin/class-print.php#L1433 View source
 */
function puiw_puiw_printinventory_before_create_html($opt, $opts, $order) {
    // Custom code to modify the behavior of puiw printinventory before create html.
    return $opt;
}
add_action('puiw_printinventory_before_create_html', 'puiw_puiw_printinventory_before_create_html', 10, 3);

puiw_printinventory_after_create_html

View source

/**
 * Example usage of the `puiw_printinventory_after_create_html` hook.
 *
 * @url https://github.com/peprodev/ultimate-invoice/blob/master/include/admin/class-print.php#L1587 View source
 */
function puiw_puiw_printinventory_after_create_html($opt, $opts, $order) {
    // Custom code to modify the behavior of puiw printinventory after create html.
    return $opt;
}
add_action('puiw_printinventory_after_create_html', 'puiw_puiw_printinventory_after_create_html', 10, 3);

puiw_printinventory_before_return_html

View source

/**
 * Example usage of the `puiw_printinventory_before_return_html` hook.
 *
 * @url https://github.com/peprodev/ultimate-invoice/blob/master/include/admin/class-print.php#L1588 View source
 */
function puiw_puiw_printinventory_before_return_html($opt, $opts, $order) {
    // Custom code to modify the behavior of puiw printinventory before return html.
    return $opt;
}
add_action('puiw_printinventory_before_return_html', 'puiw_puiw_printinventory_before_return_html', 10, 3);

puiw_printinventory_after_return_html

View source

/**
 * Example usage of the `puiw_printinventory_after_return_html` hook.
 *
 * @url https://github.com/peprodev/ultimate-invoice/blob/master/include/admin/class-print.php#L1590 View source
 */
function puiw_puiw_printinventory_after_return_html($opt, $opts, $order) {
    // Custom code to modify the behavior of puiw printinventory after return html.
    return $opt;
}
add_action('puiw_printinventory_after_return_html', 'puiw_puiw_printinventory_after_return_html', 10, 3);

Invoice Related

puiw_printinvoice_before_create_html

View source

/**
 * Example usage of the `puiw_printinvoice_before_create_html` hook.
 *
 * @url https://github.com/peprodev/ultimate-invoice/blob/master/include/admin/class-print.php#L476 View source
 */
function puiw_puiw_printinvoice_before_create_html($opt, $opts, $order) {
    // Custom code to modify the behavior of puiw printinvoice before create html.
    return $opt;
}
add_action('puiw_printinvoice_before_create_html', 'puiw_puiw_printinvoice_before_create_html', 10, 3);

puiw_printinvoice_after_create_html

View source

/**
 * Example usage of the `puiw_printinvoice_after_create_html` hook.
 *
 * @url https://github.com/peprodev/ultimate-invoice/blob/master/include/admin/class-print.php#L857 View source
 */
function puiw_puiw_printinvoice_after_create_html($opt, $opts, $order) {
    // Custom code to modify the behavior of puiw printinvoice after create html.
    return $opt;
}
add_action('puiw_printinvoice_after_create_html', 'puiw_puiw_printinvoice_after_create_html', 10, 3);

puiw_printinvoice_before_return_html

View source

/**
 * Example usage of the `puiw_printinvoice_before_return_html` hook.
 *
 * @url https://github.com/peprodev/ultimate-invoice/blob/master/include/admin/class-print.php#L858 View source
 */
function puiw_puiw_printinvoice_before_return_html($opt, $opts, $order) {
    // Custom code to modify the behavior of puiw printinvoice before return html.
    return $opt;
}
add_action('puiw_printinvoice_before_return_html', 'puiw_puiw_printinvoice_before_return_html', 10, 3);

puiw_printinvoice_after_return_html

View source

/**
 * Example usage of the `puiw_printinvoice_after_return_html` hook.
 *
 * @url https://github.com/peprodev/ultimate-invoice/blob/master/include/admin/class-print.php#L860 View source
 */
function puiw_puiw_printinvoice_after_return_html($opt, $opts, $order) {
    // Custom code to modify the behavior of puiw printinvoice after return html.
    return $opt;
}
add_action('puiw_printinvoice_after_return_html', 'puiw_puiw_printinvoice_after_return_html', 10, 3);

Order Related

woocommerce_before_order_itemmeta

View source

/**
 * Example usage of the `woocommerce_before_order_itemmeta` hook.
 *
 * @url https://github.com/peprodev/ultimate-invoice/blob/master/include/admin/class-print.php#L1914 View source
 */
function puiw_woocommerce_before_order_itemmeta($item_id, $item, $product) {
    // Custom code to modify the behavior of woocommerce before order itemmeta.
    return $item_id;
}
add_action('woocommerce_before_order_itemmeta', 'puiw_woocommerce_before_order_itemmeta', 10, 3);

woocommerce_after_order_itemmeta

View source

/**
 * Example usage of the `woocommerce_after_order_itemmeta` hook.
 *
 * @url https://github.com/peprodev/ultimate-invoice/blob/master/include/admin/class-print.php#L1935 View source
 */
function puiw_woocommerce_after_order_itemmeta($item_id, $item, $product) {
    // Custom code to modify the behavior of woocommerce after order itemmeta.
    return $item_id;
}
add_action('woocommerce_after_order_itemmeta', 'puiw_woocommerce_after_order_itemmeta', 10, 3);