• Resolved madzzoni

    (@madzzoni)


    Hello, i want to show a Booster Custom Checkout Field (1) in top of the Order email woo-template with your shortcodes: [wcj_order_checkout_field meta_key = “billing_wcj_checkout_field_1”] and also tried [wcj_order_checkout_field field_id = “billing_wcj_checkout_field_1”], but nothing show up! Then i added this functions-snippet:

    add_action( "woocommerce_email_before_order_table", "custom_woocommerce_email_before_order_table", 10, 1);
    
    function custom_woocommerce_email_before_order_table( $order ) {
    
    echo do_shortcode( '[wcj_order_checkout_field field_id = "billing_wcj_checkout_field_1"]' );
    
    }

    also without success!

    The Custom Checkout Field (1) is always present in the new-order-email, but after the order table! I want it to show up before the order-content! What is wrong here? I appreciate your help!

    //madzzoni

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support David G

    (@gravid7)

    Hi @madzzoni ,

    You also need to add the order_id args in the shortcode. so it will return the value of the specific order.

    For more details, you can check our documentation here.

    Thread Starter madzzoni

    (@madzzoni)

    Hi again, do you mean “name” ? like this:

    add_action( “woocommerce_email_before_order_table”, “custom_woocommerce_email_before_order_table”, 10, 1);

    function custom_woocommerce_email_before_order_table( $order ) {

    echo do_shortcode( ‘[wcj_order_checkout_field name=”billing_wcj_checkout_field_1″ meta_key = “billing_wcj_checkout_field_1”]‘ );

    } (Not working!)

    I just followed your own instructions shown for this modul, so could you please be more specific:

    After setting Checkout Custom Fields, you can use below shortcode with meta_key to display the Product Input Fields value:?

    1. Shortcodes: [wcj_order_checkout_field meta_key = "billing_wcj_checkout_field_<field_id>"]
      field_id is the key of your Checkout Custom Fields, You will find key from Option Custom Field
    2. PHP code: by using do_shortcode() function,
      e.g.: echo do_shortcode( '[wcj_order_checkout_field meta_key = "billing_wcj_checkout_field_1]' );

    Plugin Support David G

    (@gravid7)

    Hi @madzzoni,

    Just need to add new order_id args in shortcode same as the below example.

    echo do_shortcode( ‘[wcj_order_checkout_field name=”billing_wcj_checkout_field_1″ meta_key = “billing_wcj_checkout_field_1” order_id =”add order id here”]‘ );

    Plugin Support David G

    (@gravid7)

    Hi @madzzoni

    I haven’t heard back from you, so I believe the issue has been resolved. I’m marking this topic complete, please feel free to open a new topic for any further queries.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Checkout Field does Not show up in New Order email’ is closed to new replies.