Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter grantdailey

    (@grantdailey)

    Thanks for the update Scott.

    While you’re looking into it, I’ve had one more error I’ve been unable to figure out. I have my field set as “Required.” However, when I have a product in my cart that is not the product ID for the conditional field, it prints the conditional error message that the field is required, even though it is not displayed in the checkout fields. Any thoughts?

    Thread Starter grantdailey

    (@grantdailey)

    For anyone having issues with this, I was able to modify the “conditional-woo-checkout-field.php” file to correct the problem. Navigate to the section of the code that is commented to “Add Conditional Field to Email” and delete or comment out whatever is there. Paste the following:

    // Add Conditional Field to Email
    add_action( 'woocommerce_email_after_order_table', 'add_payment_method_to_admin_new_order', 15, 2 );
    
    function add_payment_method_to_admin_new_order($order){
    echo '<br /><strong>';
        if (get_post_meta( $order->id, get_option('oizuled_conditional_fields_title'), true )) {
    		echo get_option('oizuled_conditional_fields_title') . ':</strong><br />' . get_post_meta( $order->id, get_option('oizuled_conditional_fields_title'), true );
    	}
    }

    That does it. I know that this is not the best way to fix things, what with updates and such, but it will do the trick.

    Thread Starter grantdailey

    (@grantdailey)

    @bcworkz

    Thanks so much, that did it! Knew something had to be missing, just wasn’t sure what!

Viewing 3 replies - 1 through 3 (of 3 total)