Hello @wcmp , thank you for your guidance.
I am able to display the field, and move it with jquery, but i can’t display it to the emails. Here’s what i did so far:
add_action( 'woocommerce_product_stock_alert_form_after', 'woocommerce_product_stock_alert_form_phone_field' );
function woocommerce_product_stock_alert_form_phone_field(){
?>
<input id="alert_phone_input" type="text" pattern="[0-9]+" class="stock_alert_phone" name="alert_phone" placeholder="<?php _e('Enter your mobile phone number', 'woocommerce-product-stock-alert'); ?>"/>
<script type="text/javascript">
jQuery( function($){
$("#alert_phone_input").insertAfter('.stock_alert_email');
});
</script>
<?php
}
add_action( 'woocommerce_email_footer', 'woocommerce_email_footer_phone_field' );
function woocommerce_email_footer_phone_field(){
$alert_phone = '';
if ( ! empty($_POST['alert_phone'])){
$alert_phone = $_POST['alert_phone'];
}
?>
<p>
<strong><?php esc_html_e( 'Mobile phone number', 'woocommerce-product-stock-alert' ); ?> : </strong>
<span><?php echo $alert_phone; ?></span>
</p>
<?php
}