From 3b9124e0cf7d21ce8e1e0cbfc34ada8da5865cfc Mon Sep 17 00:00:00 2001 From: Shiva Poudel Date: Mon, 25 May 2015 16:28:19 +0545 Subject: [PATCH] Use get_field_key for generate_*_html --- includes/abstracts/abstract-wc-settings-api.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/includes/abstracts/abstract-wc-settings-api.php b/includes/abstracts/abstract-wc-settings-api.php index c15ed31ba66..7b2398b9173 100644 --- a/includes/abstracts/abstract-wc-settings-api.php +++ b/includes/abstracts/abstract-wc-settings-api.php @@ -315,7 +315,7 @@ abstract class WC_Settings_API { */ public function generate_text_html( $key, $data ) { - $field = $this->plugin_id . $this->id . '_' . $key; + $field = $this->get_field_key( $key ); $defaults = array( 'title' => '', 'disabled' => false, @@ -360,7 +360,7 @@ abstract class WC_Settings_API { */ public function generate_price_html( $key, $data ) { - $field = $this->plugin_id . $this->id . '_' . $key; + $field = $this->get_field_key( $key ); $defaults = array( 'title' => '', 'disabled' => false, @@ -405,7 +405,7 @@ abstract class WC_Settings_API { */ public function generate_decimal_html( $key, $data ) { - $field = $this->plugin_id . $this->id . '_' . $key; + $field = $this->get_field_key( $key ); $defaults = array( 'title' => '', 'disabled' => false, @@ -462,7 +462,8 @@ abstract class WC_Settings_API { * @return string */ public function generate_color_html( $key, $data ) { - $field = $this->plugin_id . $this->id . '_' . $key; + + $field = $this->get_field_key( $key ); $defaults = array( 'title' => '', 'disabled' => false, @@ -509,7 +510,7 @@ abstract class WC_Settings_API { */ public function generate_textarea_html( $key, $data ) { - $field = $this->plugin_id . $this->id . '_' . $key; + $field = $this->get_field_key( $key ); $defaults = array( 'title' => '', 'disabled' => false, @@ -554,7 +555,7 @@ abstract class WC_Settings_API { */ public function generate_checkbox_html( $key, $data ) { - $field = $this->plugin_id . $this->id . '_' . $key; + $field = $this->get_field_key( $key ); $defaults = array( 'title' => '', 'label' => '', @@ -604,7 +605,7 @@ abstract class WC_Settings_API { */ public function generate_select_html( $key, $data ) { - $field = $this->plugin_id . $this->id . '_' . $key; + $field = $this->get_field_key( $key ); $defaults = array( 'title' => '', 'disabled' => false, @@ -654,7 +655,7 @@ abstract class WC_Settings_API { */ public function generate_multiselect_html( $key, $data ) { - $field = $this->plugin_id . $this->id . '_' . $key; + $field = $this->get_field_key( $key ); $defaults = array( 'title' => '', 'disabled' => false,