snippet-library icon indicating copy to clipboard operation
snippet-library copied to clipboard

gpep-edit-entry.php: Added support for releasing inventory reserved by the entry currently being edited.

Open spivurno opened this issue 3 years ago • 0 comments
trafficstars

Context

⛑️ Ticket(s): https://secure.helpscout.net/conversation/1984777991/37879

Summary

When using our GPEP Edit Entries snippet, inventory reserved by entry being edited was not released, allowing the user to change their selection or even successfully submit the form (when using a Single Product field).

This PR adds support for that.

Note: Unlike other instances where we've adding support for releasing inventory (Nested Forms, GravityView), I opted to include this code here in the snippet rather than in GP Inventory itself. As we continue to develop and market Entry Blocks, it will replace this snippet so I'm hesitant to add code for a soon-to-be deprecated snippet in GP Inventory.

spivurno avatar Aug 20 '22 11:08 spivurno