-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
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
Prevent duplicated orders and attendees as a result #3470
Prevent duplicated orders and attendees as a result #3470
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit of a design change.
if ( ! empty( $args['email'] ) ) { | ||
$update_args['email'] = $args['email']; | ||
} | ||
|
||
if ( | ||
empty( $args['email'] ) | ||
&& ! empty( $order->purchaser['email'] ) | ||
) { | ||
$update_args['email'] = $order->purchaser['email']; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be an elseif?
i.e.
if ( ! empty( $args['email'] ) ) { ... }
if ( empty( $args['email'] ) && ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
root question - do we want to do both in order, or just one?
if ( ! empty( $args['full_name'] ) ) { | ||
$update_args['full_name'] = $args['full_name']; | ||
$update_args['title'] = $args['full_name']; | ||
} | ||
|
||
if ( | ||
empty( $args['full_name'] ) | ||
&& ! empty( $order->purchaser['full_name'] ) | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another potential elseif.
} | ||
$existing[] = $attendee_id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
$existing[] = $attendee_id; | |
} | |
$existing[] = $attendee_id; |
$gateway_key = $gateway::get_key(); | ||
|
||
$existing_order_id = (int) $args['id'] ?? 0; | ||
unset( $args['id'] ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$gateway_key = $gateway::get_key(); | |
$existing_order_id = (int) $args['id'] ?? 0; | |
unset( $args['id'] ); | |
$gateway_key = $gateway::get_key(); | |
$existing_order_id = (int) $args['id'] ?? 0; | |
unset( $args['id'] ); |
π« Ticket
ET-2279
ποΈ Description
Description in video: https://www.loom.com/share/43b3d371066c40a2b4c341e63044c8aa
π₯ Artifacts
Solution in video: https://www.loom.com/share/9342174d6cee48efaf7a4d3bec06abff
βοΈ Checklist
npm run changelog
to add changelog file(s). More info herewpunit
orintegration
tests.wpunit
orintegration
tests.