Skip to content

Commit 44bfcd1

Browse files
committed
v2.2.2
1 parent 85586ab commit 44bfcd1

File tree

4 files changed

+29
-5
lines changed

4 files changed

+29
-5
lines changed

functions/front/accounts.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@ function my_recent_order() {
77
$user_id = get_current_user_id();
88
if ($user_id === 0) return;
99

10+
$printapp_domain_key = get_option('print_app_domain_key');
11+
$credentials = \printapp\functions\general\fetch_credentials();
12+
13+
if (empty($printapp_domain_key) || empty($credentials['signature']) || empty($credentials['timestamp'])) return;
14+
1015
// load the client-class script...
1116
$lang_code = substr(get_bloginfo('language'), 0, 2);
1217
if (!$lang_code) $lang_code = 'en';
13-
$run_url = PRINT_APP_RUN_BASE_URL . $printapp_domain_key . '/user_' . $user_id . '/wp?lang=' . $lang_code;
14-
wp_enqueue_script('print_app_class', $run_url);
18+
19+
$run_url = PRINT_APP_RUN_BASE_URL . "user/{$printapp_domain_key}/{$user_id}/wp?signature={$credentials['signature']}&time={$credentials['timestamp']}&lang={$lang_code}";
20+
wp_enqueue_script('print_app_class', $run_url, '', '', true);
1521

1622
echo '<div id="print-app-user-projects" class="print-app-user-projects"></div>';
1723
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace printapp\functions\general;
4+
5+
function fetch_credentials() {
6+
7+
$printapp_domain_key = get_option('print_app_domain_key');
8+
$printapp_secret_key = get_option('print_app_secret_key');
9+
10+
if (empty($printapp_domain_key) || empty($printapp_secret_key)) return;
11+
12+
$timestamp = time();
13+
14+
return array( 'signature' => md5($printapp_domain_key . $printapp_secret_key . $timestamp), 'timestamp' => $timestamp);
15+
}

printapp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Print.App
44
* Plugin URI: https://print.app
55
* Description: Empower your customers to personalize products like Business Cards, Photo Prints, T-Shirts, Mugs, Banners, Canvases, etc. on your store before purchase
6-
* Version: 2.2.1
6+
* Version: 2.2.2
77
* Requires at least: 3.8
88
* Requires PHP: 7.4
99
* Author: Print.App ApS
@@ -45,7 +45,7 @@ class PrintApp {
4545
* PrintApp version.
4646
* @var string
4747
*/
48-
public $version = '2.2.1';
48+
public $version = '2.2.2';
4949

5050
/**
5151
* The single instance of the class.

readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: Print.App
33
Tags: customizer, photo album, print shop, web2print, gift print, diy print, product customizer, web-to-print, print software, print solution, HTML5 WYSIWYG, t-shirt designer, wysiwyg print editor, business card
44
Requires at least: 3.8
55
Tested up to: 6.8
6-
Stable tag: 2.2.1
6+
Stable tag: 2.2.2
77
License: GPLv2 or later
88
License URI: http://www.gnu.org/licenses/gpl-2.0.html
99

@@ -101,6 +101,9 @@ Check out our [website for more details](https://print.app)
101101

102102
== Changelog ==
103103

104+
= 2.2.2 =
105+
Updated the release version
106+
104107
= 2.2.1 =
105108
Updated the release version
106109

0 commit comments

Comments
 (0)