| 1 |
<?php |
| 2 |
/** |
| 3 |
* Divi: WPCode |
| 4 |
* |
| 5 |
* @package SimplePay |
| 6 |
* @subpackage Core |
| 7 |
* @copyright Copyright (c) 2023, Sandhills Development, LLC |
| 8 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 9 |
* @since 4.7.11 |
| 10 |
*/ |
| 11 |
|
| 12 |
namespace SimplePay\Core\Integration\WPCode; |
| 13 |
|
| 14 |
use SimplePay\Core\Integration\AbstractIntegration; |
| 15 |
|
| 16 |
/** |
| 17 |
* WPCode class. |
| 18 |
* |
| 19 |
* @since 4.7.11 |
| 20 |
*/ |
| 21 |
class WPCodeIntegration extends AbstractIntegration { |
| 22 |
|
| 23 |
/** |
| 24 |
* {@inheritdoc} |
| 25 |
*/ |
| 26 |
public function get_id() { |
| 27 |
return 'wpcode'; |
| 28 |
} |
| 29 |
|
| 30 |
/** |
| 31 |
* {@inheritdoc} |
| 32 |
*/ |
| 33 |
public function is_active() { |
| 34 |
return function_exists( 'wpcode_register_library_username' ); |
| 35 |
} |
| 36 |
|
| 37 |
/** |
| 38 |
* {@inheritdoc} |
| 39 |
*/ |
| 40 |
public function get_services() { |
| 41 |
return array(); |
| 42 |
} |
| 43 |
|
| 44 |
/** |
| 45 |
* {@inheritdoc} |
| 46 |
*/ |
| 47 |
public function get_subscribers() { |
| 48 |
return array( |
| 49 |
'integration-wpcode-library', |
| 50 |
); |
| 51 |
} |
| 52 |
|
| 53 |
/** |
| 54 |
* {@inheritdoc} |
| 55 |
*/ |
| 56 |
public function register() { |
| 57 |
$container = $this->getContainer(); |
| 58 |
|
| 59 |
// Extension subscriber. |
| 60 |
$container->share( |
| 61 |
'integration-wpcode-library', |
| 62 |
WPCodeLibrarySubscriber::class |
| 63 |
); |
| 64 |
} |
| 65 |
|
| 66 |
} |
| 67 |
|