wcfm-santa

A deal you can't resist! Get upto 35% Off on this entire cyber week.

CLAIM OFFER
00Day 04Hr 19Min 39Sec
wcfm-santa

getting product custom fields data

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM getting product custom fields data

Viewing 3 reply threads
  • Author
    Posts
    • #116759
      hnoble
      Participant

      Hi,

      I am working on inserting custom field information into vendor emails and I would like to know if there is a way to get custom field information from one of my fields. I have the email template ready and only need to know how to get the custom field information given a $product in a code snipet.

    • #116783

      Hello,

      Can u elaborate a little on your requirement so we can guide you accordingly? You have created custom field for product? or vendor registration/profile? and when you want to trigger the mail to vendor?

      Thanks.

    • #117004
      hnoble
      Participant

      A custom field is already created for products. I have already created a snippet to insert the information into the email invoices. I only need to be able to get the custom field information from the product. Is there a function that can be used to get this information like how we get vendor information in wcfm i.e. $vendor_id = $WCFM->wcfm_vendor_support->wcfm_get_vendor_id_from_product( $product_id );
      is there a $WCFM->wcfm_product_information->wcfm_get_custom_fields( $product_id );

    • #117160

      Hello,

      If you have created custom field(for product) by using Advanced Custom Fields(ACF) wordpress plugin, then using this get_field( "text_field" ) you can get the value. Please check : https://www.advancedcustomfields.com/resources/get_field/

      Else if you have created the field(for product) by using custom coding, then using this get_post_meta( int $post_id, $meta_key, true) you can get the value. Please check : https://developer.wordpress.org/reference/functions/get_post_meta/

      Thanks.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.