-
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.
Merge branch 'develop' into fix/6782-support-phone-dev-mode
- Loading branch information
Showing
15 changed files
with
274 additions
and
84 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,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
Improved error message for invalid payment method |
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,4 @@ | ||
Significance: patch | ||
Type: fix | ||
|
||
Fixed broken styles in authorization capture notifications |
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,4 @@ | ||
Significance: minor | ||
Type: fix | ||
|
||
Avoid using the removed deferred UPE flag |
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,4 @@ | ||
Significance: minor | ||
Type: add | ||
|
||
Adding Compatibility Service to assist with flagging possible compatibility issues in the future. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
/** | ||
* Compatibility_Service class | ||
* | ||
* @package WooCommerce\Payments | ||
*/ | ||
|
||
namespace WCPay; | ||
|
||
use WC_Payments_API_Client; | ||
use WCPay\Exceptions\API_Exception; | ||
|
||
defined( 'ABSPATH' ) || exit; // block direct access. | ||
|
||
/** | ||
* Class to send compatibility data to the server. | ||
*/ | ||
class Compatibility_Service { | ||
/** | ||
* Client for making requests to the WooCommerce Payments API | ||
* | ||
* @var WC_Payments_API_Client | ||
*/ | ||
private $payments_api_client; | ||
|
||
/** | ||
* Constructor for Compatibility_Service. | ||
* | ||
* @param WC_Payments_API_Client $payments_api_client WooCommerce Payments API client. | ||
*/ | ||
public function __construct( WC_Payments_API_Client $payments_api_client ) { | ||
$this->payments_api_client = $payments_api_client; | ||
} | ||
|
||
/** | ||
* Initializes this class's WP hooks. | ||
* | ||
* @return void | ||
*/ | ||
public function init_hooks() { | ||
add_action( 'woocommerce_payments_account_refreshed', [ $this, 'update_compatibility_data' ] ); | ||
} | ||
|
||
/** | ||
* Gets the data we need to confirm compatibility and sends it to the server. | ||
* | ||
* @return void | ||
*/ | ||
public function update_compatibility_data() { | ||
try { | ||
$this->payments_api_client->update_compatibility_data( | ||
[ | ||
'woopayments_version' => WCPAY_VERSION_NUMBER, | ||
'woocommerce_version' => WC_VERSION, | ||
] | ||
); | ||
} catch ( API_Exception $e ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch | ||
// The exception is already logged if logging is on, nothing else needed. | ||
} | ||
} | ||
} |
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.