• Hi, my customers EDD meta data table has several duplicated entries for the “business_name” and “tax_id” meta keys.

    Taking a look at your code, I realized that you’re using the following code in the business_fields.php file inside the “edd_quaderno_store_business_data” function:

    .........
    if ( isset( $current_customer ) ) {
       $current_customer->add_meta( 'tax_id', $tax_id);
    }
    .........
    if ( isset( $current_customer ) ) {
       $current_customer->add_meta( 'business_name', $business_name);
    }
    ........

    Wouldn’t it be a better idea to use the “update_meta” function? It inserts the meta field when it doesn’t exist and prevents duplicated keys.

    Best Regards,
    José Andrés

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Duplicated customer meta values business_name and tax_id’ is closed to new replies.