Skip to content

Commit

Permalink
Render 'safe_text' settings as 'text' inputs (#37154)
Browse files Browse the repository at this point in the history
  • Loading branch information
Konamiman committed Mar 10, 2023
2 parents 4f5a3d7 + 9776cad commit 4cbb607
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/woocommerce/changelog/fix-34391
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: tweak

Make sure 'safe_text' settings are rendered as 'text' inputs for compatibility.
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,20 @@ public function generate_text_html( $key, $data ) {
return ob_get_clean();
}

/**
* Generates HTML for the 'safe_text' input type (mostly used for gateway-related settings).
*
* @param string $key Field key.
* @param array $data Field data.
* @return string
*
* @since 7.6.0
*/
public function generate_safe_text_html( $key, $data ) {
$data['type'] = 'text';
return $this->generate_text_html( $key, $data );
}

/**
* Generate Price Input HTML.
*
Expand Down

0 comments on commit 4cbb607

Please sign in to comment.