# give/4.16.9/src/EventTickets/Actions/EnqueueEventDetailsScripts.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.9. 37 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.9/code/src/EventTickets/Actions/EnqueueEventDetailsScripts.php
- Raw: https://pluginprobe.com/plugins/give/4.16.9/raw/src/EventTickets/Actions/EnqueueEventDetailsScripts.php
- Modified: 2025-03-31T19:17:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.9/code/src/EventTickets/Actions/EnqueueEventDetailsScripts.php#L10-L20`.

```php
<?php

namespace Give\EventTickets\Actions;

use Give\EventTickets\Models\Event;
use Give\EventTickets\ViewModels\EventDetails;
use Give\Helpers\EnqueueScript;

class EnqueueEventDetailsScripts
{
    public function __invoke(Event $event)
    {
        $data = [
            'apiRoot' => esc_url_raw(rest_url('give-api/v2/events-tickets')),
            'apiNonce' => wp_create_nonce('wp_rest'),
            'adminUrl' => admin_url(),
            'pluginUrl' => GIVE_PLUGIN_URL,
            'currencyCode' => give_get_currency(),
            'event' => (new EventDetails($event))->exports(),
        ];

        EnqueueScript::make('give-admin-event-tickets-details', 'build/assets/dist/js/give-admin-event-tickets-details.js')
            ->loadInFooter()
            ->registerTranslations()
            ->registerLocalizeData('GiveEventTicketsDetails', $data)->enqueue();

        wp_enqueue_style(
            'give-admin-ui-font',
            'https://fonts.googleapis.com/css2?family=Open+Sans:wght@400..700&display=swap',
            [],
            null
        );

        wp_enqueue_style('givewp-design-system-foundation');
    }
}

```
