Adding Custom Hook

First, you need to declare your custom hook via the following PHP code:

 add_action(
            'your_custom_hook',
            function( $data ) {
                $render_data = isset( $data['render_data'] ) ? $data['render_data'] : [];
                $order       = isset( $render_data['order'] ) ? $render_data['order'] : null;
                echo 'Your content';
            }
        );

Then, in the Hook element, please choose Custom and type in the input

[yaymail_custom_hook hook="your_custom_hook"]

Last updated

Was this helpful?