We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// Удаление меты при изменении телефона add_action( 'woocommerce_customer_save_address', 'remove_user_meta_on_phone_change', 10, 2 ); function remove_user_meta_on_phone_change( $customer_id, $load_address ){ if ( ! is_user_logged_in() ) return; // Получаем старый и новый телефон $old_phone = get_user_meta( $customer_id, 'billing_phone', true ); $new_phone = $load_address['billing_phone']; // Если телефон изменился if ( $old_phone != $new_phone ) { // Удаление меты пользователя delete_user_meta( $customer_id, 'custom_meta_key' ); } }
The text was updated successfully, but these errors were encountered:
3d476b9
evgrezanov
No branches or pull requests
The text was updated successfully, but these errors were encountered: