• Hi,

    I’m trying to get the content html for store in a log data.

    I’m using the hook woocommerce_email_order_details for trigger and a custom global who gets correctly the email class then i want to save the email content html in a variable with the function get_content()

    $title = $wcCurrentEmail->get_default_subject(); (works perfect)

    $emailHtml = $wcCurrentEmail->get_content(); (triggers again the hook and fail)

    Any suggestion?

    Regards,
    Lucas

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support John Coy a11n

    (@johndcoy)

    Automattic Happiness Engineer

    Hi @onsterion

    There are plenty of existing email logging plugins like WP Mail Logging. Is that what you’re looking for?

    Thread Starter onsterion

    (@onsterion)

    Hi @johndcoy ,

    I’m looking to get the final html of the email.

    I’m trying to use:

    $wcCurrentEmail->get_content_html(); // WC_Email_New_Order->get_content_html()

    In the hook ‘woocommerce_email_order_details’ but when i test it i get the error:

    Fatal error: Uncaught Error: Maximum function nesting level of '256' reached, aborting! in D:\KubeyMachine\Proyectos\Web\core_kuadsystem\wp-includes\class-wp-object-cache.php on line 493

    Any suggestion?

    Regards,
    Lucas

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Stuck Getting Email Html in variable’ is closed to new replies.