Skip to content

Commit

Permalink
Remove legacy "has_adapted_extension_installed" method
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardo committed Apr 22, 2024
1 parent f0c8a56 commit e93ba05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
4 changes: 4 additions & 0 deletions changelog/fix-remove-legacy-code-in-class-woopay-utilities
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Remove legacy method from `WooPay_Utilities`.
17 changes: 1 addition & 16 deletions includes/woopay/class-woopay-utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,24 +252,9 @@ public static function get_woopay_url() {
return defined( 'PLATFORM_CHECKOUT_HOST' ) ? PLATFORM_CHECKOUT_HOST : self::DEFAULT_WOOPAY_URL;
}

/**
* Returns true if an extension WooPay supports is installed .
*
* @return bool
*/
public function has_adapted_extension_installed() {
foreach ( self::ADAPTED_EXTENSIONS as $supported_extension ) {
if ( in_array( $supported_extension, apply_filters( 'active_plugins', get_option( 'active_plugins' ) ), true ) ) {
return true;
}
}

return false;
}

/**
* Return an array with encrypted and signed data.
*
*
* @param array $data The data to be encrypted and signed.
* @return array The encrypted and signed data.
*/
Expand Down

0 comments on commit e93ba05

Please sign in to comment.