# surecart/4.2.2/app/src/Controllers/Admin/Learn/LearnScriptsController.php

SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, &amp; Payments, version 4.2.2. 51 lines.

- Page: https://pluginprobe.com/plugins/surecart/4.2.2/code/app/src/Controllers/Admin/Learn/LearnScriptsController.php
- Raw: https://pluginprobe.com/plugins/surecart/4.2.2/raw/app/src/Controllers/Admin/Learn/LearnScriptsController.php
- Modified: 2026-04-21T16:53:00+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/surecart/4.2.2/code/app/src/Controllers/Admin/Learn/LearnScriptsController.php#L10-L20`.

```php
<?php

namespace SureCart\Controllers\Admin\Learn;

use SureCart\Models\Processor;
use SureCart\Support\Scripts\AdminModelEditController;

/**
 * Learn page scripts.
 */
class LearnScriptsController extends AdminModelEditController {
	/**
	 * What types of data to add the the page.
	 *
	 * @var array
	 */
	protected $with_data = [ 'currency', 'supported_currencies' ];

	/**
	 * Script handle.
	 *
	 * @var string
	 */
	protected $handle = 'surecart/scripts/admin/learn';

	/**
	 * Script path.
	 *
	 * @var string
	 */
	protected $path = 'admin/settings/learn';

	/**
	 * Enqueue scripts with additional learn-specific data.
	 *
	 * @return void
	 */
	public function enqueue() {
		$this->data['processors']              = Processor::get();
		$this->data['brand_logo_url']          = \SureCart::account()->brand->logo_url ?? null;
		$this->data['brand_color']             = \SureCart::account()->brand->color ?? null;
		$this->data['shop_page_edit_url']      = \SureCart::pages()->getId( 'shop' )
			? admin_url( 'post.php?post=' . \SureCart::pages()->getId( 'shop' ) . '&action=edit' )
			: '';
		$this->data['dashboard_page_edit_url'] = \SureCart::pages()->getId( 'dashboard' )
			? admin_url( 'post.php?post=' . \SureCart::pages()->getId( 'dashboard' ) . '&action=edit' )
			: '';
		parent::enqueue();
	}
}

```
