Skip to main content

fc_pro_before_order_details_section_{section_id}

Type: Action

Fires before the contents of an order details section.

The dynamic portion of the hook name, $section_id, is the order details section ID. Possible hook names include:

  • fc_pro_before_order_details_section_customer_information
  • fc_pro_before_order_details_section_delivery_information
  • fc_pro_before_order_details_section_downloads
  • fc_pro_before_order_details_section_gift_message
  • fc_pro_before_order_details_section_licenses
  • fc_pro_before_order_details_section_order_details
  • fc_pro_before_order_details_section_order_notes
  • fc_pro_before_order_details_section_order_status
  • fc_pro_before_order_details_section_order_summary
  • fc_pro_before_order_details_section_payment_method
  • fc_pro_before_order_details_section_subscriptions

Signature​

do_action( 'fc_pro_before_order_details_section_{section_id}', $section_id );

Parameters​

NameTypeDescription
$section_idstringSection ID.

Since​

  • 1.3.0

Source: inc/order-details.php

Examples​

In fc_pro_before_order_details_section_{section_id}, order_summary replaces {section_id}.

add_action( 'fc_pro_before_order_details_section_order_summary',
/**
* Add promotional message before order summary section.
*
* @param string $section_id Section ID.
*/
function( $section_id ) {
echo '<div class="promotional-message">';
echo '<p>' . esc_html__( 'Thank you for your purchase! Enjoy 10% off your next order.', 'text-domain' ) . '</p>';
echo '</div>';
},
10
);