From b9dfdacad4d8146bf620c0ac97552c8d32e76b6d Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Thu, 13 Oct 2016 18:19:13 -0300 Subject: [PATCH] Removed confuse helper --- includes/class-wc-emails.php | 2 +- includes/class-wc-structured-data.php | 24 ------------------------ 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/includes/class-wc-emails.php b/includes/class-wc-emails.php index b5f9b47100a..e7ab165ceae 100644 --- a/includes/class-wc-emails.php +++ b/includes/class-wc-emails.php @@ -468,6 +468,6 @@ class WC_Emails { 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' ); - 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 ); } } diff --git a/includes/class-wc-structured-data.php b/includes/class-wc-structured-data.php index 51f2bdcf9d4..1eb57b91b58 100644 --- a/includes/class-wc-structured-data.php +++ b/includes/class-wc-structured-data.php @@ -161,30 +161,6 @@ class WC_Structured_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. *