Add Column to products table

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 Add Column to products table

Tagged: 

Viewing 3 reply threads
  • Author
    Posts
    • #28012
      Rami
      Participant

      Hi,
      I am trying to add a column to the vendor products table that contains ACF field (a dynamic link to other pages), I added the column to woocommerce back end products table, and I thought it will be auto generated by WCFM, but it didn’t.
      What filter do I need to use to add the column and contents for the table.
      Thanks.

    • #28085
      WCFM Forum
      Member

      Hi,

      WCFM Vendor dashboard has an additional hidden column, you may use that for the purpose.

      Use this filter for display the data – apply_filters( ‘wcfm_vendors_additonal_data’, ‘–’, $wcfm_vendors_id );

      You may change that column name using this filter – apply_filters( ‘wcfm_vendors_additional_info_column_label’, __( ‘Additional Info’, ‘wc-frontend-manager’ ) );

      And off course add this line of code to make that column visible –

      add_filter( 'wcfm_vendors_additonal_data_hidden', '__return_false' );

      Feel free to ask me if you require any other assistance on this!

      Thank You

    • #28114
      Rami
      Participant

      Thank you for your reply and I appreciate your help, but I think I didn’t make my needs clear enough.
      The filters above are to add additional column to “vendors” table in the admin WCFM dashboard, but what I needed is to add the column to the “products” table in the vendor WCFM dashboard, where the vendor is the logged in user.
      Please see the attached image, and forgive me, the site is RTL and in Arabic.
      Thanks.

    • #28127
      WCFM Forum
      Member

      Hi,

      Ahh … sorry, may be I got your requirement wrongly.

      Well, Products table also has a “Additional Column” for showing extra data. But this can’t be visible the position you have mention –

      For here,

      1. Show data using this filter – apply_filters( ‘wcfm_products_additonal_data’, ‘–’, $product_id );
      2. Change column name by this filter – apply_filters( ‘wcfm_products_additional_info_column_label’, __( ‘Additional Info’, ‘wc-frontend-manager’ ) );
      3. Make this visible by adding this line of code –

      add_filter( 'wcfm_products_additonal_data_hidden', '__return_false' );

      Thank You

Viewing 3 reply threads
  • The topic ‘Add Column to products table’ is closed to new replies.