I have a wordpress site where Iv assigned a global Variable $rushad and given it the value of a text box found on my product page.
global $rushad;
if((isset($_POST['tmcp_textfield_0'])) && !empty($_POST['tmcp_textfield_1']))
{
$rushad= $_POST['tmcp_textfield_0']; //note i used $_POST since you have a post form **method='post'**
}
I now want to use this information to trigger an email from a plugin Im using.
To do this I modified the plugins code like this....
function woocommerce_gift_coupon_send_action( $post_ids ) {
global $wpdb;
require_once WOOCOMMERCE_GIFT_COUPON_DIR . 'includes/mail-template.php';
$generated_coupon = 0;
foreach ( $post_ids as $post_id ) {
$order = new WC_Order( $post_id );
$items = $order->get_items();
$mailto = $rushad;
$coupons_mail = array();
$sc = false;
$coupons_to_generated = woocommerce_gift_coupon_check_order_coupons_count( $post_id );
$coupons_generated = woocommerce_gift_coupon_check_order_coupons( $post_id );
But its Not working yet.
Any Advice on where Im messing up?