YayMagic Email Builder 1.0.2 has 33 actions and 57 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 YayMagic Email Builder fires an action
add_action( 'post_edd_sl_plugin_updater_setup', function( $edd_plugin_data ) {
// Your code runs here.
}, 10, 1 );
// Change a value YayMagic Email Builder is about to use
add_filter( 'yaymail_email_preheader_pad_length', function( $target_length, $preheader ) {
// Change $target_length here.
return $target_length;
}, 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
-
/** * Fires after the $edd_plugin_data is setup. */ do_action( 'post_edd_sl_plugin_updater_setup', $edd_plugin_data ); -
/** * Filter the target length for invisible preheader padding. */ apply_filters( 'yaymail_email_preheader_pad_length', $target_length, $preheader ); -
/** * Extra shortcodes: order meta... */ apply_filters( 'yaymail_extra_shortcodes', $shortcodes, $data ); -
/** * Handle init core Emails, Templates, Elements, Shortcodes, Integrations * $hook_name => $priority */ apply_filters( 'yaymail_temp_init_hook_name', 'init' ); -
/** * Action: yaymail_trigger_email */ do_action( 'yaymail_trigger_email', $email, $order_id ); -
/** * Filter: yaymail_trigger_to_preview_email */ apply_filters( 'yaymail_trigger_to_preview_email', false, $email, $order_id ); -
apply_filters( 'yaymail_email_render_priority', 10, $this->id ); -
apply_filters( 'yaymail_required_migration_names', [] ); -
apply_filters( 'woocommerce_order_item_name', $product_name, $item, false ); -
apply_filters( 'yaycommerce_licensing_plugins', [] ); -
apply_filters( 'yaymail_get_all_templates', $template_model->find_all() ); -
do_action( "yaymail_order_details_item_{$key}_content", null, $this->order, $this->element_data, true ); -
apply_filters( 'edd_sl_api_request_verify_ssl', \true, $this ); -
do_action( "in_plugin_update_message-{$file}", $plugin, $version_info ); -
apply_filters( 'woocommerce_bacs_account_fields', [ 'bank_name' => [ 'label' => __( 'Bank', 'woocommerce' ), 'value' => $bacs_account->bank_name, ], 'account_number' => [ 'label' => __( 'Account number', 'woocommerce' ), 'value' => $bacs_account->account_number, ], 'sort_code' => [ 'label' => $sortcode, 'value' => $bacs_account->sort_code, ], 'iban' => [ 'label' => __( 'IBAN', 'woocommerce' ), 'value' => $bacs_account->iban, ], 'bic' => [ 'lab... ); -
apply_filters( 'woocommerce_bacs_accounts', $payment_gateway->account_details, $order_instance->get_id() ); -
apply_filters( 'woocommerce_email_order_item_quantity', $qty_display, $item ); -
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); -
apply_filters( 'woocommerce_mail_content', $email->style_inline( $content ) ); -
apply_filters( 'woocommerce_order_item_class', $row_classes, $item, $order_data ); -
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order_data, '' ); -
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order_data, '' ); -
apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ); -
apply_filters( 'woocommerce_order_item_visible', true, $item ); -
apply_filters( 'yay_recommended_plugins_excluded', self::get_other_plugins() ); -
do_action( 'yaycommerce_admin_shell_booted', $instance ); -
do_action( 'yaycommerce_admin_shell_license_enabled', $adapter ); -
apply_filters( 'yaycommerce_admin_shell_plugin_info', $info, $info->slug ); -
do_action( 'yaycommerce_licenses_page' ); -
do_action( "yaymail_{$email->get_id()}_register_shortcodes", $email ); -
apply_filters( "yaymail_{static::$type}_layout", yaymail_get_content( $path, array_merge( [ 'element' => $element_data ], $args ) ), $element_data, $args ); -
do_action( "yaymail_{YAYMAIL_ALL_EMAILS}_register_shortcodes", $email ); -
do_action( "yaymail_{YAYMAIL_NON_ORDER_EMAILS}_register_shortcodes", $email ); -
do_action( "yaymail_{YAYMAIL_WITH_ORDER_EMAILS}_register_shortcodes", $email ); -
apply_filters( 'yaymail_activated_addons', [] ); -
apply_filters( 'yaymail_additional_localized_variables', [] ); -
apply_filters( 'yaymail_addon_download_files', [], $args ); -
apply_filters( 'yaymail_addon_supported_plugins', $data ); -
do_action( 'yaymail_after_email_content', $template, $render_data ); -
do_action( 'yaymail_after_enqueue_scripts', $this->entries ); -
yaymail_after_enqueue_settings_page_scripts
action Used by 2 plugins β Copy link Customise this hookdo_action( 'yaymail_after_enqueue_settings_page_scripts' ); -
apply_filters( 'yaymail_backup_state_data', $backup_data ); -
do_action( 'yaymail_before_email_content', $template, $render_data ); -
yaymail_before_enqueue_settings_page_scripts
action Used by 2 plugins β Copy link Customise this hookdo_action( 'yaymail_before_enqueue_settings_page_scripts' ); -
do_action( 'yaymail_before_init' ); -
do_action( 'yaymail_before_order_id_changed', $order_id ); -
do_action( 'yaymail_before_reset_migration_commit', $backup, $removed_migrations ); -
apply_filters( 'yaymail_common_shortcodes', $shortcodes ); -
apply_filters( 'yaymail_custom_shortcode', [], $yaymail_information, $args ); -
apply_filters( 'yaymail_customs_shortcode', [], $yaymail_information, $args ); -
yaymail_default_global_header_override_content
filter Used by 2 plugins β Copy link Customise this hookapply_filters( 'yaymail_default_global_header_override_content', $default_heading ); -
apply_filters( 'yaymail_default_global_header_settings', $default ); -
apply_filters( 'yaymail_element_available_email_ids', $available_email_ids, $this ); -
apply_filters( 'yaymail_email_get_language', $this->get_language( null ), null, $args, $this ); -
apply_filters( 'yaymail_email_get_variant', '', $order, $args, $this, $template_name ); -
apply_filters( 'yaymail_email_styles', $css ); -
apply_filters( 'yaymail_email_subject', $subject, $template, $args ); -
apply_filters( 'yaymail_excluded_templates', [ 'yaymail_global_header_footer' ] ); -
apply_filters( 'yaymail_extra_element_attributes', [], $element['type'] ); -
do_action( 'yaymail_init_rest_controllers' ); -
do_action( 'yaymail_init_start' ); -
apply_filters( 'yaymail_is_woocommerce_order', $is_wc_order, $order ); -
do_action( 'yaymail_loaded' ); -
apply_filters( 'yaymail_migration_backup_data', $backup_data ); -
apply_filters( 'yaymail_order_details_items', 'templates/shortcodes/order-details/order-items/main.php' ); -
apply_filters( 'yaymail_order_details_structure_table', [ 'items' => [ 'product' => [ 'label' => $this->titles['product'], 'col_span' => apply_filters( 'yaymail_order_item_product_title_colspan', 1, $this->element_data ), 'style' => [ 'word-wrap' => 'break-word', 'width' => $this->show_product_item_cost ? '40%' : '45%', ], ], 'cost' => [ 'label' => $this->titles['cost'], 'col_span' => apply_filters( 'yaymail_order_item_cost_colspan', 1, $this->eleme... ); -
apply_filters( 'yaymail_order_item_cost_colspan', 1, $this->element_data ); -
apply_filters( 'yaymail_order_item_price_colspan', 1, $this->element_data ); -
apply_filters( 'yaymail_order_item_product_title_colspan', 1, $this->element_data ); -
apply_filters( 'yaymail_order_item_quantity_colspan', 1, $this->element_data ); -
apply_filters( 'yaymail_order_progress_step_index', null, $wc_order, $element ); -
apply_filters( 'yaymail_preview_email', $email_preview_output, $search_order_id, $template_name, $email_address, $variant ); -
yaymail_previewing_template_is_yaymail_template
filter Used by 2 plugins β Copy link Customise this hookapply_filters( 'yaymail_previewing_template_is_yaymail_template', false ); -
do_action( 'yaymail_register_elements', $this ); -
do_action( 'yaymail_register_emails', $yaymail_emails ); -
do_action( 'yaymail_register_patterns', $this->service ); -
do_action( 'yaymail_register_shortcodes', $this ); -
do_action( 'yaymail_register_template_library', $template_library_service ); -
do_action( 'yaymail_register_template_sections', $this->service ); -
do_action( 'yaymail_run_addon_migrations' ); -
apply_filters( 'yaymail_shipping_address_content', $order_instance->get_formatted_shipping_address(), $order_instance ); -
apply_filters( 'yaymail_template_exclude_style', [] ); -
apply_filters( "yaymail_template_get_{$prop}", $value, $this ); -
apply_filters( 'yaymail_template_rendering_args', $args, $template_name, $elements ); -
apply_filters( 'yaymail_translations', [] ); -
apply_filters( 'yaymail_validate_element_before_sending', true, $element, $args ); -
apply_filters( 'yaymail_wp_mail_message_before_send', $content, $args );
Generated from YayMagic Email Builder'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: