33 * Plugin Name: Payneteasy payment system
44 * Plugin URI: https://github.com/payneteasy/php-plugin-woocommerce?tab=readme-ov-file#php-plugin-for-woocommerce-wordpress
55 * Description: Allows you to use payment system Payneteasy with the WooCommerce.
6- * Version: 1.2.0
6+ * Version: 1.2.1
77 * Author: Payneteasy
88 * Author URI: https://payneteasy.com/
99 * Text Domain: wc-payneteasy
1212 * Requires Plugins: woocommerce/woocommerce
1313 *
1414 * @package Payneteasy
15- * @version 1.2.0
15+ * @version 1.2.1
1616 */
1717
1818if (!defined ('ABSPATH ' )) exit ; # Exit if accessed directly
@@ -48,7 +48,7 @@ class WC_Payneteasy extends WC_Payment_Gateway {
4848 function __construct () {
4949 $ this ->id = 'wc_payneteasy ' ;
5050 $ this ->icon = apply_filters ('woocommerce_payneteasy_icon ' , plugin_dir_url (__FILE__ ).'payneteasy.png ' );
51- $ this ->method_title = __ ('Payment system Payneteasy v1.2.0 ' , 'wc-payneteasy ' );
51+ $ this ->method_title = __ ('Payment system Payneteasy v1.2.1 ' , 'wc-payneteasy ' );
5252 $ this ->method_description = __ ('Plugin "Payneteasy Payment System" for WooCommerce, which allows you to integrate online payments. ' , 'wc-payneteasy ' );
5353 $ this ->has_fields = false ;
5454
@@ -78,7 +78,7 @@ public static function hook_plugin_update_info($rv, $action, $args) {
7878
7979 private static function fetch_update_json ($ failret = null ): ?array {
8080 if (!($ json_str = get_transient (self ::GITHUB_REPO ))) {
81- if (!empty ($ json_str = wp_remote_retrieve_body ( wp_remote_get (sprintf ('https://raw.githubusercontent.com/%s/refs/heads/main/update.json ' , self ::GITHUB_REPO )) )))
81+ if (!empty ($ json_str = wp_remote_retrieve_body ( wp_remote_get (sprintf ('https://raw.githubusercontent.com/%s/refs/heads/main/. update.json ' , self ::GITHUB_REPO )) )))
8282 set_transient (self ::GITHUB_REPO , $ json_str , HOUR_IN_SECONDS );
8383 else
8484 return $ failret ;
@@ -99,17 +99,17 @@ public static function hook_plugin_check_version(stdClass $T): stdClass {
9999 if ($ info ->version != $ T ->checked [$ entry = plugin_basename (__FILE__ )]) {
100100 $ is_pkg_avail = wp_remote_head ($ pkg_url = sprintf ('https://github.com/%s/releases/download/v%s/php-plugin-woocommerce.zip ' , self ::GITHUB_REPO , $ info ->version ));
101101
102- if (is_wp_error ($ is_pkg_avail ) || !in_array (wp_remote_retrieve_response_code ($ is_pkg_avail ), [ 200 , 302 ]))
103- $ pkg_url = null ; #throw new Payneteasy\lib\ApiException('New release package is not available yet');
104-
105102 $ T ->response [$ entry ] = (object )[
106103 'plugin ' => $ entry ,
107- 'package ' => $ pkg_url ,
108104 'slug ' => $ info ->slug ,
109105 'new_version ' => $ info ->version ,
110106 'requires ' => $ info ->requires ,
107+ 'requires_php ' => $ info ->requires_php ,
108+ 'package ' => (is_wp_error ($ is_pkg_avail ) || !in_array (wp_remote_retrieve_response_code ($ is_pkg_avail ), [ 200 , 302 ])) ? '' : $ pkg_url ,
111109 'url ' => 'https://github.com/payneteasy/php-plugin-woocommerce/blob/main/README.md#php-plugin-for-woocommerce-wordpress ' ];
112110 }
111+ else
112+ $ T ->no_update [$ entry ] = (object )[ 'slug ' => $ info ->slug , 'plugin ' => $ entry , 'new_version ' => $ info ->version ];
113113
114114 return $ T ;
115115 }
0 commit comments