WC_Structured_Data::__construct()publicWC 1.0

Constructor.

Method of the class: WC_Structured_Data{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Structured_Data = new WC_Structured_Data();
$WC_Structured_Data->__construct();

WC_Structured_Data::__construct() code WC 8.7.0

public function __construct() {
	// Generate structured data.
	add_action( 'woocommerce_before_main_content', array( $this, 'generate_website_data' ), 30 );
	add_action( 'woocommerce_breadcrumb', array( $this, 'generate_breadcrumblist_data' ), 10 );
	add_action( 'woocommerce_single_product_summary', array( $this, 'generate_product_data' ), 60 );
	add_action( 'woocommerce_email_order_details', array( $this, 'generate_order_data' ), 20, 3 );

	// Output structured data.
	add_action( 'woocommerce_email_order_details', array( $this, 'output_email_structured_data' ), 30, 3 );
	add_action( 'wp_footer', array( $this, 'output_structured_data' ), 10 );
}