Skip to content

Duplicate INSERT with the same code_id and user_id in the table wp_pmpro_discount_codes_uses #144

@ipokkel

Description

@ipokkel

Describe the bug
A customer reported the following:

The plugin allow duplicate INSERT with the same code_id and user_id in the table wp_pmpro_discount_codes_uses which set a wrong available seats and block next sponsored user to register (when the max seats is reach).

This happens here.

$sqlQuery = "INSERT INTO $wpdb->pmpro_discount_codes_levels (code_id,

Expected behavior
We should consider adding a check to avoid duplicate submissions.

Additional Information
Ticket no. 520675

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions