• Resolved fengwp

    (@fengwp)


    Hi, I want to display custom fields in WooCommerce Short Description area, or after Short Description.

    I found the following code, but added it to the functions.php file of my child theme, but unfortunately it doesn’t work.

    function display_custom_field_woocommerce() {
    global $post;
    ?>
    <p><?php echo get_post_meta($post->ID, 'finish', true); ?></p>
    <?php
    }
    add_filter( 'woocommerce_before_add_to_cart_form', 'display_custom_field_woocommerce' );

    ‘finish’ is the custom field name in Advanced Custom Fields, while ‘woocommerce_before_add_to_cart_form’ is the hook name. I suppose this code may only apply to custom fields created by built-in WooCommerce fields.

    I have Field Groups, and make it only apply to a specific category of WooCommerce product.

    There are 7-8 fields in that Field Group, is it possible to display all fields in that group? Also I need to display both field label and field value.

    How can I edit that code?

    Thanks!

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

Viewing 1 replies (of 1 total)
  • Hi there!

    ACF Support Team here. This forum is generally used by ACF users to help each other out.

    However, we would love to continue investigating and troubleshooting this issue, please can you create a ticket using our ?support form and we can look into it further.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.