| Total Complexity | 3 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class ChecShortcode |
||
| 9 | { |
||
| 10 | use Configurable; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Path to Chec embeddable checkout JavaScript file |
||
| 14 | * |
||
| 15 | * @config |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | private static $javascript_url = 'https://assets.chec-cdn.com/js/embed.js'; |
||
|
|
|||
| 19 | |||
| 20 | /** |
||
| 21 | * Domain for hosted Chec checkout |
||
| 22 | * |
||
| 23 | * @config |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | private static $checkout_domain = 'https://checkout.chec.io'; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * ShortCode which adds a link to a Chec buy now popup window |
||
| 30 | * |
||
| 31 | * @param array $arguments |
||
| 32 | * @param string $content |
||
| 33 | * @return string |
||
| 34 | */ |
||
| 35 | public static function getBuyNowButton($arguments, $content = null): string |
||
| 54 |