Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter camelot

    (@camelot0212)

    Hi, thanks for your guidance, I was able to get correct meta. After got the variation name slug, I converted it using get_term_by().

    One small question, I want to put invoice number in email header (admin new order) using this

    add_filter('woocommerce_email_subject_new_order', 'change_admin_email_subject', 1, 2);
    function change_admin_email_subject( $subject, $order ) {
    	global $woocommerce, $wpo_wcpdf;
    	$invoice = $wpo_wcpdf->invoice_number();
    	$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    	$subject = sprintf( '[%s]New order number %s from %s %s', $blogname, $invoice, $order->billing_first_name, $order->billing_last_name );
    	return $subject;
    }

    in $invoice = line, i tried both $wpo_wcpdf->invoice_number() and $wpo_wcpdf->export->get_invoice_number( $order->id ) but got an empty value in both case. Could you please help me? Thanks.

    • This reply was modified 9 years, 6 months ago by camelot.
Viewing 1 replies (of 1 total)