wcfm-santa

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

CLAIM OFFER
01Day 18Hr 59Min 36Sec
wcfm-santa

Custom Output in Orders Section

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!

Viewing 3 reply threads
  • Author
    Posts
    • #63919
      Jack Cliff
      Guest

      I want to know if the following is something I can do.

      In the purchased section (renamed description in the below screenshot), I would like the product name to instead have custom information I pull from somewhere else.

      So instead of 180xCertificates, it would say 180x(custom output here)

      I have a custom field in all my products called “Item Title”. I need the product name to display what is entered there instead. I want to know if this sort of thing is possible with this plugin if I learned how to do it? Would I do it with Hooks and Filters?

      Orders Page Customise

    • #64215
      WCFM Forum
      Keymaster

      Hi,

      Off course possible.

      You have to use this filter –

      apply_filters( 'wcfm_order_item_name', $item->get_name(), $item )

      If you know me that custom title meta name, then I will help you to write the whole code.

      Well, this will work after WCFM next update.

      Thank You

    • #65104
      Jack Cliff
      Guest

      Hi,

      Thanks! The name of the field is aws_price_calc_43

      Thank You so much

    • #65315
      WCFM Forum
      Keymaster

      Hi,

      Here is your code for the purpose –

      add_filter( 'wcfm_order_item_name', function( $item_name, $item ) {
      	$product_id = $item->get_product_id();
      	$aws_price_calc_43 = get_post_meta( $product_id, 'aws_price_calc_43', true );
      	if( $aws_price_calc_43 ) $item_name = $aws_price_calc_43;
      	return $item_name;
      }, 50, 2 );

      Thank You

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