Skip to main content

License

PropertyValue
descriptionSureCart licensing behavior and supported customization for MAC Core.
tagsdoc, mac-core, admin, license
rating

Overview

MAC Core uses the bundled SureCart licensing SDK to render and manage its licensing UI.

The license experience is intentionally embedded into the existing MAC Core admin page instead of creating a second admin menu.

How It Works

During runtime initialization, the licensing service:

  1. resolves the public token
  2. loads the bundled SureCart SDK from inc/Vendor/SureCart/Licensing/Client.php
  3. creates a SureCart client for mac-core.php
  4. registers the licensing page against the existing mac-core menu slug

The licensing page uses:

  • page title: MAC Core License
  • menu slug: mac-core
  • capability: manage_options

Activation and deactivation redirects are configured to land on:

  • wp-admin/admin.php?page=mac-core&tab=license

What the Admin Sees

When licensing is available:

  • the License tab renders the SureCart settings UI

When licensing is not available:

  • the License tab shows an inline warning
  • admins may also see top-level warnings in admin_notices

Failure Modes

Missing Public Token

If the resolved public token is blank, the plugin shows an admin warning that licensing is not configured.

Missing Bundled SDK

If the bundled SureCart SDK cannot be loaded, the plugin shows an admin warning that the licensing runtime could not be loaded.

Client Not Initialized

If the License tab renders before a valid client exists, the tab shows a warning instead of a fatal error or blank screen.

Supported Customization Point

The supported way to override the licensing public token is:

  • mac_core_surecart_public_token

Example:

<?php

add_filter(
'mac_core_surecart_public_token',
function (): string {
return 'pt_your_public_token_here';
}
);

Recommended rule:

  • override the token through the filter when environment-specific behavior is needed
  • do not patch the plugin file or the vendored SureCart SDK directly

What Is Not Public API

Do not rely on:

  • the exact internal SureCart client setup calls
  • the vendored SDK file layout beyond the documented behavior
  • private methods inside the licensing service