Removed confuse helper

This commit is contained in:
Claudio Sanches 2016-10-13 18:19:13 -03:00
parent 291c731b22
commit b9dfdacad4
2 changed files with 1 additions and 25 deletions

View File

@ -468,6 +468,6 @@ class WC_Emails {
public function order_schema_markup( $order, $sent_to_admin = false, $plain_text = false ) { public function order_schema_markup( $order, $sent_to_admin = false, $plain_text = false ) {
_deprecated_function( 'WC_Emails::order_schema_markup', '2.7', 'WC_Structured_Data::generate_order_data' ); _deprecated_function( 'WC_Emails::order_schema_markup', '2.7', 'WC_Structured_Data::generate_order_data' );
WC()->structured_data->generate_output_structured_data( 'order', $order, $sent_to_admin, $plain_text ); WC()->structured_data->generate_order_data( $order, $sent_to_admin, $plain_text );
} }
} }

View File

@ -161,30 +161,6 @@ class WC_Structured_Data {
return $sanitized_data; return $sanitized_data;
} }
/**
* Generates, sanitizes, encodes and outputs specific structured data type.
*
* @param string $type
* @param mixed $object (default: null)
* @param mixed $param_1 (default: null)
* @param mixed $param_2 (default: null)
* @param mixed $param_3 (default: null)
* @return bool
*/
public function generate_output_structured_data( $type, $object = null, $param_1 = null, $param_2 = null, $param_3 = null ) {
if ( ! is_string( $type ) ) {
return false;
}
$generate = 'generate_' . $type . '_data';
if ( method_exists( $this, $generate ) && $this->$generate( $object, $param_1, $param_2, $param_3 ) ) {
return $this->output_structured_data( $type );
} else {
return false;
}
}
/** /**
* Limits Product structured data on taxonomies and shop page. * Limits Product structured data on taxonomies and shop page.
* *