# give/4.16.8.1/src/Helpers/EnqueueScript.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.8.1. 33 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.8.1/code/src/Helpers/EnqueueScript.php
- Raw: https://pluginprobe.com/plugins/give/4.16.8.1/raw/src/Helpers/EnqueueScript.php
- Modified: 2022-03-31T22:56:06+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.8.1/code/src/Helpers/EnqueueScript.php#L10-L20`.

```php
<?php

namespace Give\Helpers;

/**
 * This class use to register script.
 * This class internally uses asset information to set script dependencies and version generated by @wordpress/dependency-extraction-webpack-plugin package.
 * It also handles script translation registration.
 *
 * @since 2.19.6
 */
class EnqueueScript
{
    /**
     * @since 2.19.6
     *
     * @param string $scriptId
     * @param string $scriptPath
     *
     * @return \Give\Framework\EnqueueScript
     */
    public static function make($scriptId, $scriptPath)
    {
        return new \Give\Framework\EnqueueScript(
            $scriptId,
            $scriptPath,
            GIVE_PLUGIN_DIR,
            GIVE_PLUGIN_URL,
            'give'
        );
    }
}

```
