Skip to content

Commit 321813c

Browse files
authored
Merge pull request #7 from arianoangelo/master
v4.4
2 parents 51c830d + 654780e commit 321813c

19 files changed

Lines changed: 846 additions & 531 deletions

CryptAPI.php

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<?php
2-
32
/*
43
Plugin Name: CryptAPI Payment Gateway for WooCommerce
54
Plugin URI: https://github.com/cryptapi/woocommerce-cryptapi
65
Description: Accept cryptocurrency payments on your WooCommerce website
7-
Version: 4.3.3
8-
Requires at least: 4.0
6+
Version: 4.4.3
7+
Requires at least: 5
98
Tested up to: 5.9.3
10-
WC requires at least: 2.4
11-
WC tested up to: 6.2
12-
Requires PHP: 5.5
9+
WC requires at least: 5.8
10+
WC tested up to: 6.5.1
11+
Requires PHP: 7.2
1312
Author: cryptapi
1413
Author URI: https://cryptapi.io/
1514
License: MIT
@@ -129,3 +128,44 @@ function cryptapi_deactivation()
129128
wp_clear_scheduled_hook('cryptapi_cronjob');
130129
}
131130

131+
add_action('admin_notices', 'cryptapi_pro_notice');
132+
133+
function cryptapi_pro_notice()
134+
{
135+
$user_id = get_current_user_id();
136+
if (!get_user_meta($user_id, 'cryptapi_pro_notice_dismissed')) {
137+
$curr_page = get_current_screen()->base;
138+
139+
$allowed_pages = [
140+
"dashboard",
141+
"plugins"
142+
];
143+
if (in_array($curr_page, $allowed_pages)) {
144+
?>
145+
<div class="notice notice-info is-dismissible">
146+
<p>
147+
Meet CryptAPI Pro, a dashboard to suit all your needs. Get your API Key now: <a href="https://pro.cryptapi.io/" target="_blank">pro.cryptapi.io</a><br/>
148+
<button style="text-decoration: none;" class="notice-dismiss cryptapi-pro-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button>
149+
</p>
150+
</div>
151+
<script>
152+
document.querySelector(".cryptapi-pro-dismiss").addEventListener("click", function () {
153+
const urlParams = new URLSearchParams(window.location.search);
154+
urlParams.set('cryptapi-dismissed', '');
155+
window.location.search = urlParams;
156+
})
157+
</script>
158+
<?php
159+
}
160+
}
161+
162+
}
163+
164+
add_action('admin_init', 'cryptapi_pro_notice_dismissed');
165+
166+
function cryptapi_pro_notice_dismissed()
167+
{
168+
$user_id = get_current_user_id();
169+
if (isset($_GET['cryptapi-dismissed']))
170+
add_user_meta($user_id, 'cryptapi_pro_notice_dismissed', 'true', true);
171+
}

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Accept cryptocurrency payments on your WooCommerce website
66
### Requirements:
77

88
```
9-
PHP >= 5.5
10-
Wordpress >= 4.4
11-
WooCommerce >= 2.4
9+
PHP >= 7.2
10+
Wordpress >= 5
11+
WooCommerce >= 5.8
1212
```
1313

1414
### Description
@@ -235,6 +235,23 @@ The easiest and fastest way is via our live chat on our [website](https://crypta
235235
#### 4.3.3
236236
* Minor fixes
237237

238+
#### 4.3.4
239+
* Feature to enable marking virtual products order as completed instead of processing
240+
* Minor fixes
241+
242+
#### 4.4
243+
* Support CryptAPI Pro
244+
* Minor fixes
245+
246+
#### 4.4.1
247+
* Minor fixes
248+
249+
#### 4.4.2
250+
* Minor fixes
251+
252+
#### 4.4.3
253+
* Minor fixes
254+
238255
### Upgrade Notice
239256
#### 4.3
240257
* Please be sure to enable the PHP extension BCMath before upgrading to this version.

controllers/CryptAPI.php

Lines changed: 78 additions & 39 deletions
Large diffs are not rendered by default.

define.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22

3-
define('CRYPTAPI_PLUGIN_VERSION', '4.3.3');
3+
define('CRYPTAPI_PLUGIN_VERSION', '4.4.3');
44
define('CRYPTAPI_PLUGIN_PATH', plugin_dir_path(__FILE__));
55
define('CRYPTAPI_PLUGIN_URL', plugin_dir_url(__FILE__));
1.97 KB
Binary file not shown.

0 commit comments

Comments
 (0)