| 1 |
<?php namespace TierPricingTable\Admin\WelcomePage; |
| 2 |
|
| 3 |
use TierPricingTable\Core\ServiceContainerTrait; |
| 4 |
|
| 5 |
class WelcomePage { |
| 6 |
|
| 7 |
use ServiceContainerTrait; |
| 8 |
|
| 9 |
const PAGE_SLUG = 'tiered-pricing-table-welcome'; |
| 10 |
|
| 11 |
public function __construct() { |
| 12 |
|
| 13 |
add_action( 'admin_menu', function () { |
| 14 |
add_submenu_page( '__none__', __( 'Welcome to Tiered Pricing for WooCommerce!', 'tier-pricing-table' ), |
| 15 |
__( 'Hidden Admin Page', 'tier-pricing-table' ), 'manage_options', self::PAGE_SLUG, |
| 16 |
array( $this, 'render' ), 99 ); |
| 17 |
} ); |
| 18 |
} |
| 19 |
|
| 20 |
public function render() { |
| 21 |
$this->getContainer()->getFileManager()->includeTemplate( 'admin/welcome-page/welcome-page.php' ); |
| 22 |
} |
| 23 |
|
| 24 |
public static function getURL(): string { |
| 25 |
return admin_url( 'admin.php?page=' . self::PAGE_SLUG ); |
| 26 |
} |
| 27 |
} |
| 28 |
|