• HI guys, I’m trying to get all of the customer order details onto your fantastic plugin’s order notes and invoices.

    I have a few custom fields on the checkout setup using Terry Tsang’s Woocommerce Custom Checkout Options plugin and have tried using the follwing method to call the fields without success (I’m still learning how to use functions!)

    1) Opened this file
    wp-content/plugins/woocommerce-delivery-notes/woocommerce-delivery-notes.php

    2) updated this section:

    /**
    * Get order custom field
    */
    if ( !function_exists( ‘wcdn_get_order_custom_field’ ) ) {
    function wcdn_get_order_custom_field( $field ) {
    global $wcdn;
    return $wcdn->print->get_order()->order_custom_fields[‘Leave Safe Spot’][0];
    }
    }

    3) to:

    /**
    * Get order custom field
    */
    if ( !function_exists( ‘wcdn_get_order_custom_field’ ) ) {
    function wcdn_get_order_custom_field( $field ) {
    global $wcdn;
    echo wcdn_get_order_custom_field(‘custom_save_order_fields’);
    echo wcdn_get_order_custom_field(‘newfield2’);
    echo wcdn_get_order_custom_field(‘newfield3’);
    }
    }

    4) as these seem to be the fields I want to call into the invoice/delivery note. However it’s not working!

    custom_save_order_fields
    newfield2
    newfield3

    Any ideas how I can get this working?

    https://www.ads-software.com/plugins/woocommerce-delivery-notes/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi I have exactly the same problem and do not know what to do.

    Thread Starter templemeads

    (@templemeads)

    Hi Toma, I can’t find an answer for this, need to fix it soon!

    WooThemes advised me that it was unique to my install and it was a plugin conflict causing it so I should deactivate all plugins and see what happens (easier said than done on a live ecommerce site with 30+ plugins) all was working fine before the upgrade and then BANG all gone.

    Hope someone can advise us what to do…

    Saturday I’m going to WordCamp in Prague and perhaps still around, I do not know where to go, in all discussions suggest

    <?php echo get_post_meta($post->ID, 'autor', true;?>

    but it can only be used in the loop? I’m not a programmer so do not understand it….

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Getting custom fields from WooCommerce Custom Checkout Options plugin on invoice’ is closed to new replies.