Support

Account

Home Forums Backend Issues (wp-admin) Cannot get_field to send in an e-mail Reply To: Cannot get_field to send in an e-mail

  • Hi @pjpulumbarit

    I am afraid the get_field/the_field expects a second parameter for the post ID otherwise the global post ID values is used.

    Try changing the code as follows and let me know how it goes.

    	$service_name = get_field('service_name', $post_id);
    	$customer_name = get_field('customer_name', $post_id); // where $post_id is the post ID from which you are loading the ACF value. 

    Hope this helps.