• I need to add a column that has the fee for each item which is stored as meta data for the product – Meta:_ign_product_fee

    It is adding all the fees together and displaying them which is great, but they also need to see the fee line by line. Could even put it in product information area if need be.

    Is there a way to do this?

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support kenil802

    (@kenil802)

    Hi @akwholesaledist,

    Apologies for the delay in response.

    To add the meta field of the product in the product description area you need to add the below code in the functions.php file of the active theme.

    Code:
    add_filter( ‘wcdn_order_item_fields’, ‘wcdn_product_field’, 10, 4 );
    function wcdn_product_field( $array, $product, $order, $item ) {
    $new_fields = array();
    $new_fields[‘field_name’] = array(
    ‘label’ => ‘Your field name :’,
    ‘value’ => get_post_meta( $product->id, ‘_ign_product_fee’, true )
    );
    return $new_fields;
    }

    Do let us know how it goes.

    Regards,
    Kenil Shah

    Thread Starter akwholesaledist

    (@akwholesaledist)

    I should be able to add this as a snippet correct? If so, it isn’t working.

    Plugin Support kenil802

    (@kenil802)

    Hi @akwholesaledist,

    Apologies for the delay in response.

    Using the code which is shared with you will add the field in the product description area like this:- https://prnt.sc/y0m854, so could you please check whether the meta key used is correct or not?

    Regards,
    Kenil Shah

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Product Fee’ is closed to new replies.