Add "Orders" column

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!

Tagged: 

Viewing 5 reply threads
  • Author
    Posts
    • #30730
      nakedharmonix
      Participant

      Hi,
      We are using the Affiliate plugin.
      I’d like to add a column for Affiliate to “WCFM Dashboard> Orders”. Could you advise to us for how to add columns?
      Regards,
      TK

    • #30845
      WCFM Forum
      Member

      Hi,

      Which Affliate plugin you are using?

      Thank You

    • #30846
      nakedharmonix
      Participant

      Hi
      We using AffiliateWP
      Regards,

    • #30856
      WCFM Forum
      Member

      hi,

      Are you comfortable in PHP/WP coding?

      Thank You

    • #30894
      nakedharmonix
      Participant

      Hi

      Our coder’s answer is “yes”.

    • #30945
      WCFM Forum
      Member

      Hi,

      That’s great.

      Kindly ask him to add this code to the site –

      add_filter( 'wcfm_orders_additional_info_column_label', function( $affiliate_column_label ) {
      	$affiliate_column_label = 'Affiliate';
      	return $affiliate_column_label;
      });
      add_filter( 'wcfm_orders_additonal_data_hidden', '__return_false' );
      
      add_filter( 'wcfm_orders_additonal_data',function( $affiliate_column_data, $order_id ) {
      	$affiliate_column_data = ''; // SET YOUR DATA HERE
      	return $affiliate_column_data;
      }, 50, 2);

      This will add a new column under WCFM Order dashboard. He just have to display Affiliate data at that column for an Order.

      Thank You

Viewing 5 reply threads
  • The topic ‘Add "Orders" column’ is closed to new replies.