WC_Emails::order_schema_markup()publicWC 2.6.0

Deprecated from version 3.0.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Adds Schema.org markup for order in JSON-LD format.

Method of the class: WC_Emails{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Emails = new WC_Emails();
$WC_Emails->order_schema_markup( $order, $sent_to_admin, $plain_text );
$order(WC_Order) (required)
Order instance.
$sent_to_admin(true|false)
If should sent to admin.
Default: false
$plain_text(true|false)
If is plain text email.
Default: false

Notes

Changelog

Since 2.6.0 Introduced.
Deprecated since 3.0.0

WC_Emails::order_schema_markup() code WC 8.6.1

public function order_schema_markup( $order, $sent_to_admin = false, $plain_text = false ) {
	wc_deprecated_function( 'WC_Emails::order_schema_markup', '3.0', 'WC_Structured_Data::generate_order_data' );

	WC()->structured_data->generate_order_data( $order, $sent_to_admin, $plain_text );
	WC()->structured_data->output_structured_data();
}