Advanced Notifications: Developer customizations

This guide covers code-level customizations for Advanced Notifications: sending Purchases notifications for orders that move from Pending payment to On hold, turning off specific Purchases triggers, and overriding the notification email templates in your theme.

Note:

This is a Developer level doc. If you are unfamiliar working with code and resolving potential conflicts, we recommend you work with a Woo Agency Partner for larger projects, or find a WooCommerce developer on Codeable for smaller customizations. We are unable to provide support for customizations under our Support Policy.

Send Purchases notifications for on-hold orders

↑ Back to top

Since version 1.2.33, Advanced Notifications doesn’t send a Purchases notification when an order changes from Pending payment to On hold. To send one again, add this filter in a custom plugin or a code snippets plugin:

add_filter( 'woocommerce_advanced_notifications_purchase_pending_to_on-hold', '__return_true' );

Don’t add it to your theme’s functions.php file. Advanced Notifications checks this filter when plugins load, before the theme’s functions.php runs, so the filter has no effect there.

Turn off specific Purchases triggers

↑ Back to top

Each order status change that sends a Purchases notification has its own filter, and they’re all on by default. Return false from a filter to stop notifications for that change. For example, this stops Purchases notifications when a failed order is paid and moves to Processing:

add_filter( 'woocommerce_advanced_notifications_purchase_failed_to_processing', '__return_false' );

These are the status-change filters. The partial-payment ones only apply if you use Deposits.

  • woocommerce_advanced_notifications_purchase_pending_to_processing
  • woocommerce_advanced_notifications_purchase_pending_to_completed
  • woocommerce_advanced_notifications_purchase_on-hold_to_processing
  • woocommerce_advanced_notifications_purchase_on-hold_to_completed
  • woocommerce_advanced_notifications_purchase_failed_to_processing
  • woocommerce_advanced_notifications_purchase_failed_to_completed
  • woocommerce_advanced_notifications_purchase_pending_to_partial-payment
  • woocommerce_advanced_notifications_purchase_on-hold_to_partial-payment
  • woocommerce_advanced_notifications_purchase_failed_to_partial-payment

To send Purchases notifications only when an order changes to Completed, from any status, turn off all the status-change filters at once:

add_filter( 'woocommerce_advanced_notifications_multiple_statuses_trigger', '__return_false' );

As with the on-hold filter, add these in a custom plugin or a code snippets plugin, not your theme’s functions.php file.

Override the email templates

↑ Back to top

Advanced Notifications builds its emails from these templates in the plugin’s templates/emails/ folder:

  • new-order.php
  • new-order-plain.php
  • refunds.php
  • refunds-plain.php

To customize a template, copy it into your theme using the same folder structure. WooCommerce then loads your copy instead of the plugin’s version. For example:

  • yourtheme/woocommerce-advanced-notifications/emails/new-order.php

Note:

Updates to Advanced Notifications don’t change your copies. After each update, compare your overrides with the plugin’s templates and bring over any changes you need.

Questions and support

↑ Back to top

Something missing from this documentation? Still have questions and need assistance?

  • If you have a question about a specific extension or theme you’d like to purchase, contact us to get answers.
  • If you already purchased this product and need some assistance, get in touch with a Happiness Engineer via our support page and select this product’s name from the Product dropdown.
Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.