| 1 |
<?php namespace TierPricingTable\Integrations\Plugins; |
| 2 |
|
| 3 |
/** |
| 4 |
* U2Code Product Multicurrency for WooCommerce — automatic exchange rates, geolocation, |
| 5 |
* per-currency price rules and a storefront switcher. |
| 6 |
* |
| 7 |
* Like the U2Code Product Addons pairing, price-conversion glue belongs on the multicurrency |
| 8 |
* plugin's side; this class registers the pairing on the Tiered Pricing side and gives future |
| 9 |
* TPT-side glue a place to live. |
| 10 |
*/ |
| 11 |
class U2CodeMulticurrency extends PluginIntegrationAbstract { |
| 12 |
|
| 13 |
|
| 14 |
public function getTitle(): string { |
| 15 |
return 'U2Code Multicurrency'; |
| 16 |
} |
| 17 |
|
| 18 |
public function getDescription(): string { |
| 19 |
return __( 'Sell in multiple currencies — automatic exchange rates, geolocation detection, per-currency price rules and a customizable switcher.', |
| 20 |
'tier-pricing-table' ); |
| 21 |
} |
| 22 |
|
| 23 |
public function getSlug(): string { |
| 24 |
return 'u2code-multicurrency'; |
| 25 |
} |
| 26 |
|
| 27 |
public function isOfficial(): bool { |
| 28 |
return true; |
| 29 |
} |
| 30 |
|
| 31 |
public function getMetaPills(): array { |
| 32 |
return array( |
| 33 |
__( 'Automatic exchange rates', 'tier-pricing-table' ), |
| 34 |
__( 'Geolocation', 'tier-pricing-table' ), |
| 35 |
__( 'Per-currency price rules', 'tier-pricing-table' ), |
| 36 |
__( 'Multi-currency checkout', 'tier-pricing-table' ), |
| 37 |
); |
| 38 |
} |
| 39 |
|
| 40 |
public function getAuthorURL(): string { |
| 41 |
return 'https://u2code.com/plugins/multicurrency-for-woocommerce/?utm_source=tiered-pricing-table&utm_medium=plugin&utm_campaign=integrations-page'; |
| 42 |
} |
| 43 |
|
| 44 |
public function getIconURL(): string { |
| 45 |
return $this->getContainer()->getFileManager()->locateAsset( 'admin/integrations/u2code-multicurrency-icon.png' ); |
| 46 |
} |
| 47 |
|
| 48 |
public function getActionLinks(): array { |
| 49 |
return array( |
| 50 |
array( |
| 51 |
'url' => 'https://wordpress.org/plugins/u2code-product-multicurrency-for-woocommerce/', |
| 52 |
'label' => __( 'Free on WordPress.org', 'tier-pricing-table' ), |
| 53 |
'target' => '_blank', |
| 54 |
), |
| 55 |
array( |
| 56 |
'url' => 'https://u2code.com/plugins/multicurrency-for-woocommerce/?utm_source=tiered-pricing-table&utm_medium=plugin&utm_campaign=integrations-page', |
| 57 |
'label' => __( 'Learn more', 'tier-pricing-table' ), |
| 58 |
'target' => '_blank', |
| 59 |
), |
| 60 |
); |
| 61 |
} |
| 62 |
|
| 63 |
public function run() { |
| 64 |
/** |
| 65 |
* The pairing is registered. Conversion glue ships with the multicurrency plugin — |
| 66 |
* future Tiered Pricing–side glue for this integration belongs here. |
| 67 |
* |
| 68 |
* @param U2CodeMulticurrency $this |
| 69 |
*/ |
| 70 |
do_action( 'tiered_pricing_table/integration/u2code_multicurrency/run', $this ); |
| 71 |
} |
| 72 |
|
| 73 |
public function getIntegrationCategory(): string { |
| 74 |
return 'multicurrency'; |
| 75 |
} |
| 76 |
|
| 77 |
|
| 78 |
} |
| 79 |
|