-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
156 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/** | ||
* WooCommerce Payments WC_Payments_Settings_Service Class | ||
* | ||
* @package WooCommerce\Payments | ||
*/ | ||
|
||
use WCPay\MultiCurrency\Interfaces\MultiCurrencySettingsInterface; | ||
|
||
defined( 'ABSPATH' ) || exit; | ||
|
||
/** | ||
* WC_Payments_Settings_Service. | ||
*/ | ||
class WC_Payments_Settings_Service implements MultiCurrencySettingsInterface { | ||
/** | ||
* Checks if dev mode is enabled. | ||
* | ||
* @return bool | ||
*/ | ||
public function is_dev_mode(): bool { | ||
return WC_Payments::mode()->is_dev(); | ||
} | ||
|
||
/** | ||
* Gets the plugin file path. | ||
* | ||
* @return string | ||
*/ | ||
public function get_plugin_file_path(): string { | ||
return WCPAY_PLUGIN_FILE; | ||
} | ||
|
||
/** | ||
* Gets the plugin version. | ||
* | ||
* @return string | ||
*/ | ||
public function get_plugin_version(): string { | ||
return WCPAY_VERSION_NUMBER; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
multi-currency/src/Interfaces/MultiCurrencySettingsInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* Interface MultiCurrencySettingsInterface | ||
* | ||
* @package WooCommerce\Payments\MultiCurrency\Interfaces | ||
*/ | ||
|
||
namespace WCPay\MultiCurrency\Interfaces; | ||
|
||
defined( 'ABSPATH' ) || exit; | ||
|
||
interface MultiCurrencySettingsInterface { | ||
|
||
/** | ||
* Checks if dev mode is enabled. | ||
* | ||
* @return bool | ||
*/ | ||
public function is_dev_mode(): bool; | ||
|
||
/** | ||
* Gets the plugin file path. | ||
* | ||
* @return string | ||
*/ | ||
public function get_plugin_file_path(): string; | ||
|
||
/** | ||
* Gets the plugin version. | ||
* | ||
* @return string | ||
*/ | ||
public function get_plugin_version(): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.