Skip to content

Instantly share code, notes, and snippets.

@kreamweb
Created February 2, 2021 12:12
Show Gist options
  • Save kreamweb/9a82249bcd69965644bedfe5f7d4cd05 to your computer and use it in GitHub Desktop.
Save kreamweb/9a82249bcd69965644bedfe5f7d4cd05 to your computer and use it in GitHub Desktop.
<?php
add_action('woocommerce_email_footer', 'raq_quote_email', 1);
function raq_quote_email( $email ){
if( is_a( $email, 'YITH_YWRAQ_Send_Quote') && isset( $email->raq) ){
$raq = $email->raq;
$order = wc_get_order($raq['order-id']);
$other_fields = $order->get_meta('ywraq_other_email_fields', true );
foreach ( $other_fields as $key => $value ){
printf( '<p><strong>%s:</strong> %s</p>', $key, esc_html( $value ) );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment