| 1 |
<?php |
| 2 |
|
| 3 |
namespace IvyForms\Services\Integrations; |
| 4 |
|
| 5 |
/** |
| 6 |
* Resolves the ivyforms-middleware base URL (constant + filter). |
| 7 |
*/ |
| 8 |
class MiddlewareUrl |
| 9 |
{ |
| 10 |
public static function getBaseUrl(): string |
| 11 |
{ |
| 12 |
$url = defined('IVYFORMS_MIDDLEWARE_URL') ? IVYFORMS_MIDDLEWARE_URL : ''; |
| 13 |
|
| 14 |
/** |
| 15 |
* Filter the IvyForms integration middleware base URL. |
| 16 |
* |
| 17 |
* @since 1.0.0 |
| 18 |
* |
| 19 |
* @param string $url Middleware base URL without trailing slash. |
| 20 |
*/ |
| 21 |
return rtrim((string) apply_filters('ivyforms/payment/middleware_url', $url), '/'); |
| 22 |
} |
| 23 |
} |
| 24 |
|