Skip to content

Instantly share code, notes, and snippets.

@bhavik-kiri
Last active November 4, 2017 06:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhavik-kiri/e9c360b19da96dfe7154933540cff615 to your computer and use it in GitHub Desktop.
Save bhavik-kiri/e9c360b19da96dfe7154933540cff615 to your computer and use it in GitHub Desktop.
<?php
add_action( 'woocommerce_before_add_to_cart_button', 'add_fields_before_add_to_cart' );
function add_fields_before_add_to_cart( ) {
?>
<table>
<tr>
<td>
<?php _e( "Name:", "aoim"); ?>
</td>
<td>
<input type = "text" name = "customer_name" id = "customer_name" placeholder = "Name on Gift Card">
</td>
</tr>
<tr>
<td>
<?php _e( "Message:", "aoim"); ?>
</td>
<td>
<input type = "text" name = "customer_message" id = "customer_message" placeholder = "Your Message on Gift Card">
</td>
</tr>
</table>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment