WC_Emails::order_schema_markuppublicWC 2.6.0

Deprecated since 3.0.0. It is no longer supported and may 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.

Returns

void. 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

See: WC_Structured_Data::generate_order_data()

Changelog

Since 2.6.0 Introduced.
Deprecated since 3.0.0

WC_Emails::order_schema_markup() code WC 11.0.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();
}