Skip to content

Commit 9899750

Browse files
authored
Merge pull request #159 from gigya/develop
6.0.3
2 parents 2ec1bdc + c71d212 commit 9899750

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

GigyaAction.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function __construct() {
3939
define( 'GIGYA__PRIVATE_KEY', $this->global_options['rsa_private_key'] ?? '' );
4040
define( 'GIGYA__API_DOMAIN', _gigya_data_center( $this->global_options ) );
4141
define( 'GIGYA__API_DEBUG', $this->global_options['debug'] );
42+
define( 'GIGYA__JS_CDN', 'https://cdns.' . GIGYA__API_DOMAIN . '/js/socialize.js' );
4243
} else {
4344
define( 'GIGYA__API_KEY', '' );
4445
define( 'GIGYA__USER_KEY', '' );
@@ -48,6 +49,7 @@ public function __construct() {
4849
define( 'GIGYA__PRIVATE_KEY', '' );
4950
define( 'GIGYA__API_DOMAIN', '' );
5051
define( 'GIGYA__API_DEBUG', '' );
52+
define( 'GIGYA__JS_CDN', GIGYA__DEFAULT_JS_CDN );
5153
}
5254

5355
add_action( 'init', array( $this, 'init' ) );
@@ -120,12 +122,10 @@ public function __construct() {
120122
*/
121123
public function init()
122124
{
123-
if (!file_exists(GIGYA__PLUGIN_DIR . 'vendor/autoload.php')) {
124-
return;
125-
}
126-
127125
/* Require SDK libraries */
128-
require_once GIGYA__PLUGIN_DIR . 'vendor/autoload.php';
126+
if ( file_exists( GIGYA__PLUGIN_DIR . 'vendor/autoload.php' ) ) { /* If the plugin is installed by Composer as a `wordpress-plugin`, this becomes unnecessary, but require_once makes sure it's not included again */
127+
require_once GIGYA__PLUGIN_DIR . 'vendor/autoload.php';
128+
}
129129
require_once GIGYA__PLUGIN_DIR . 'cms_kit/GigyaJsonObject.php';
130130
require_once GIGYA__PLUGIN_DIR . 'cms_kit/GigyaUserFactory.php';
131131
require_once GIGYA__PLUGIN_DIR . 'cms_kit/GigyaProfile.php';
@@ -188,7 +188,7 @@ public function init()
188188
if ( ! empty( $api_key ) ) {
189189
/* * Loads requirements for any Gigya's login
190190
* Load Gigya's socialize.js from CDN */
191-
wp_enqueue_script( 'gigya_cdn', GIGYA__JS_CDN . GIGYA__API_KEY . '&lang=' . $params['lang'] );
191+
wp_enqueue_script( 'gigya_cdn', GIGYA__JS_CDN . '?apiKey=' . GIGYA__API_KEY . '&lang=' . $params['lang'] );
192192

193193
if ( ! empty( $this->login_options ) ) /* Empty only happens on initial plugin enable, before configuring it */ {
194194
/* Social Login – load requirements */

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gigya/wordpress",
33
"description": "Integrate your WordPress site with SAP Customer Data Cloud",
4-
"type": "project",
4+
"type": "wordpress-plugin",
55
"license": "Apache 2.0",
66
"authors": [
77
{
@@ -15,6 +15,7 @@
1515
],
1616
"minimum-stability": "stable",
1717
"require": {
18+
"composer/installers": "^1.9",
1819
"gigya/php-sdk": "^3.0",
1920
"ext-json": "*",
2021
"ext-openssl": "*"

gigya.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: SAP Customer Data Cloud
44
* Plugin URI: https://www.sap.com/products/crm/customer-data-management.html
55
* Description: Allows sites to utilize the SAP Customer Data Cloud API for authentication and social network updates.
6-
* Version: 5.11
6+
* Version: 6.0.3
77
* Author: SAP SE
88
* Author URI: https://www.sap.com/products/crm/customer-data-management.html
99
* License: Apache v2.0
@@ -20,11 +20,10 @@
2020
*/
2121
define( 'GIGYA__MINIMUM_WP_VERSION', '4.7' );
2222
define( 'GIGYA__MINIMUM_PHP_VERSION', '5.6' );
23-
define( 'GIGYA__VERSION', '6.0.2' );
23+
define( 'GIGYA__VERSION', '6.0.3' );
2424
define( 'GIGYA__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
2525
define( 'GIGYA__PLUGIN_URL', plugin_dir_url( __FILE__ ) );
26-
define( 'GIGYA__CDN_PROTOCOL', ! empty( $_SERVER['HTTPS'] ) ? 'https://cdns' : 'http://cdn' );
27-
define( 'GIGYA__JS_CDN', GIGYA__CDN_PROTOCOL . '.gigya.com/js/socialize.js?apiKey=' );
26+
define( 'GIGYA__DEFAULT_JS_CDN', 'https://cdns.gigya.com/js/socialize.js' );
2827
define( 'GIGYA__LOG_LIMIT', 50 );
2928
define( 'GIGYA__DEFAULT_COOKIE_EXPIRATION', 1800 ); /* WordPress defaults to 172800 (48 hours) */
3029
define( 'GIGYA__DEFAULT_REMEMBER_COOKIE_EXPIRATION', 20000000 ); /* For Remember Me sessions */

readme.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Contributors: SAP SE/gigya.com konforti, luciodiri, ynhockey, shaharzillber.
44
Tags: CIAM, CIM, Registration, Social Login, Oauth, OpenSocial, Graph API, Facebook Connect, Linkedin, Twitter, authentication, OpenID, newsfeed, tweet, status update, registration, social APIs, sharing, plugin, social bookmark, social network, Facebook, community, comments, reactions, game mechanics, register, SAP Customer Data Cloud, Social Infrastructure, feed
55
Requires at least: 4.2
66
Tested up to: 4.9
7-
Stable tag: 6.0.2
7+
Stable tag: 6.0.3
88
License: Apache v2.0
99

1010
Integrate your WordPress site with SAP Customer Data Cloud.
@@ -196,6 +196,11 @@ For question about installations or configuration, please contact your account m
196196
= 6.0.2 =
197197
* Allowed any RSA key format in client-side validation
198198

199+
= 6.0.3 =
200+
* Fixed JavaScript loading from SAP CDN not under gigya.com domains
201+
* SAP JavaScript is now only retrieved via HTTPS
202+
* Added a new way to install SAP CDC plugin with Composer
203+
199204
== FAQ ==
200205

201206
Can I configure the design of the SAP Customer Data Cloud component?

0 commit comments

Comments
 (0)