Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Ricardo Perdigão

    (@toyote)

    Olá,

    O nº da carta está no erro – 259398836.

    De qualquer forma, no dia seguinte já gravou…
    Provável problema do lado dos CTT.

    Hi @natewr

    I have the same problem.

    I don’t understand the last solution

    Once we figure out that missing piece, though, you should be able to use the following hooks from my plugin to toggle the language before sending the notification emails:

    /**
    * Hook in before a notification is sent
    */
    add_action( ‘rtb_send_notification_before’, function( $notification ) {

    // Don’t do anything if this isn’t an email notification
    if ( !is_a( $notification, ‘rtbNotificationEmail’ ) ) {
    return;
    }

    // Switch the language here

    // Fetch the subject and message again
    $notification->set_subject();
    $notification->set_message();
    }

    /**
    * Hook in after a notification is sent
    */
    add_action( ‘rtb_send_notification_after’, function( $notification ) {

    // Don’t do anything if this isn’t an email notification
    if ( !is_a( $notification, ‘rtbNotificationEmail’ ) ) {
    return;
    }

    // Switch the language back to what it was before

    }

    Where I insert this code?

    Best regards
    Ricardo

Viewing 2 replies - 1 through 2 (of 2 total)