pommes84
Forum Replies Created
-
By the way I’m using for email design the plugin “Kadence WooCommerce Email Designer”
Hi Ben,
this is another plugin with whom you can extend the woocommerce checkout and build up your own needed fields. I need to show up these fields in the emails. Could you help me out? There are more of them numbered from billing_wooccm10 – billing_wooccm17.
Thanks,
MarcoHi,
I tried it but it didnd’t worked. I pasted the following via snippet in:
add_filter( ‘kadence_woomail_order_body_text’, ‘custom_function_for_billing_wooccm12’, 10, 2 );
function custom_function_for_billing_wooccm12( $text, $order ) {
if ( is_a( $order, ‘WC_Order’ ) ) {
$text = str_replace( ‘{billing_wooccm12}’, $order->get_billing_wooccm12(), $text );
}
return $text;
}If I use the one above error is stated if I try to design templates.
And tried also this one:
add_action( ‘wp_enqueue_scripts’, ‘enqueue_parent_styles’ );function enqueue_parent_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );
}
?>add_filter( ‘kadence_woomail_order_body_text’, ‘custom_function_for_billing_wooccm12’, 10, 2 );
function custom_function_for_billing_wooccm12( $text, $order ) {
if ( is_a( $order, ‘WC_Order’ ) ) {
$text = str_replace( ‘{billing_wooccm12}’, $order->get_billing_wooccm12(), $text );
}
return $text;
}No error, but placeholder is not shown in the email template setup.
Could you help?