PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
← All changes | src/EventTickets/Actions/ConvertEventTicketsBlockToFieldsApi.php +4 -3 4.16.54.16.9 View file →
@@ -14,8 +14,9 @@
14 14
15 15 class ConvertEventTicketsBlockToFieldsApi
16 16 {
17 17 /**
18 + * @since 4.16.8.1 Resolve a purchased ticket type only among the ticket types of this block's own event, and reject it if that event has already ended.
18 19 * @since 4.6.0 Add support for currency conversion
19 20 * @since 3.20.0 Set event end date and time.
20 21 * @since 3.12.2 Remove event ID from field name
21 22 * @since 3.6.0
@@ -38,12 +39,12 @@
38 39 ->endDateTime($event->endDateTime->format('Y-m-d H:i:s'))
39 40 ->description($event->description)
40 41 ->ticketTypes($ticketTypes);
41 42
42 - $eventTicketsField->scope(function (EventTickets $field, $value, Donation $donation) {
43 + $eventTicketsField->scope(function (EventTickets $field, $value, Donation $donation) use ($event) {
43 44
44 - $ticketPurchaseData = array_map(function ($data) {
45 - return TicketPurchaseData::fromFieldValueObject($data);
45 + $ticketPurchaseData = array_map(function ($data) use ($event) {
46 + return TicketPurchaseData::fromFieldValueObject($data, $event);
46 47 }, json_decode($value));
47 48
48 49 array_walk($ticketPurchaseData, new GenerateTicketsFromPurchaseData($donation));
49 50