Skip to content

Instantly share code, notes, and snippets.

@plugin-republic
Created May 24, 2019 08:45
Show Gist options
  • Save plugin-republic/a586396fe42dbb9433395640600f7128 to your computer and use it in GitHub Desktop.
Save plugin-republic/a586396fe42dbb9433395640600f7128 to your computer and use it in GitHub Desktop.
Display a text add-on in a table
<?php
/**
* A text field template
* @since 2.0.0
* @package WooCommerce Product Add-Ons Ultimate
* @see https://pluginrepublic.com/documentation/overriding-templates/ for more details
*/
// Exit if accessed directly
if( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<table>
<tbody>
<tr>
<td>
<?php echo pewc_field_label( $item, $id ); ?>
</td>
<td>
<?php $attributes = pewc_get_text_field_attributes( $item ); ?>
<input type="text" class="pewc-form-field" id="<?php echo esc_attr( $id ); ?>" name="<?php echo esc_attr( $id ); ?>" <?php echo $attributes; ?> value="<?php echo esc_attr( $value ); ?>">
</td>
</tr>
</tbody>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment