Settings
1 week ago
BlockHooks.php
1 week ago
BlockHooksFactory.php
1 week ago
Factory.php
1 year ago
Hooks.php
1 week ago
Strings.php
1 week ago
Factory.php
20 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WCML\PaymentGateways; |
| 4 | |
| 5 | use function WPML\Container\make; |
| 6 | |
| 7 | class Factory implements \IWPML_Backend_Action_Loader, \IWPML_Frontend_Action_Loader, \IWPML_REST_Action_Loader { |
| 8 | |
| 9 | public function create() { |
| 10 | $hooks = [ make( Hooks::class ) ]; |
| 11 | |
| 12 | if ( is_admin() || wpml_is_rest_request() ) { |
| 13 | $hooks[] = make( Settings\TranslationControls::class ); |
| 14 | } |
| 15 | |
| 16 | return $hooks; |
| 17 | } |
| 18 | |
| 19 | } |
| 20 |