Skip to content

Commit a4a648e

Browse files
authored
Merge pull request #175 from WebDevStudios/release220
Release 2.1.2
2 parents d97ba56 + eb3f73b commit a4a648e

File tree

15 files changed

+7069
-2697
lines changed

15 files changed

+7069
-2697
lines changed

README.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: constantcontact, webdevstudios, znowebdev, jmichaelward, ggwicz, r
33
Tags: Constant Contact, WooCommerce, eCommerce, email marketing, marketing automation, email, form, forms, marketing, mobile, opt-in, plugin, signup, subscribe, subscription, widget
44
Requires at least: 5.2.2
55
Tested up to: 6.2.2
6-
Stable tag: 2.1.1
6+
Stable tag: 2.1.2
77
Requires PHP: 7.2
88
License: GPLv3
99

@@ -83,6 +83,12 @@ You've connected your WooCommerce store to Constant Contact, promoted your WooCo
8383

8484
== Changelog ==
8585

86+
= 2.1.2 =
87+
* Fixed - `enableStoreDetails` javascript console error.
88+
* Fixed - PHP8 compatibility errors.
89+
* Fixed - Mismatch in SettingsModel PHP signature.
90+
* Updated - Build tools versions.
91+
8692
= 2.1.1 =
8793
* Updates - Remove deprecated customer properties usage.
8894

app/admin-bundle.js

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,96 @@
1-
(()=>{"use strict";function e(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}var t=new(function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.els={}}var n,l;return n=t,(l=[{key:"init",value:function(){this.cacheEls(),this.bindEvents(),this.enableStoreDetails()}},{key:"cacheEls",value:function(){this.els.enableStoreDetails=document.getElementById("cc_woo_save_store_details"),this.els.optionalFields=document.getElementById("cc-optional-fields")}},{key:"bindEvents",value:function(){var e=this;this.els.enableStoreDetails.addEventListener("change",(function(t){e.enableStoreDetails()}))}},{key:"enableStoreDetails",value:function(){this.els.enableStoreDetails.checked?(console.log(this.els.optionalFields.parentElement),this.els.optionalFields.parentElement.style.display="block"):this.els.optionalFields.parentElement.style.display="none"}}])&&e(n.prototype,l),t}());window.onload=function(e){t.init()}})();
1+
/*
2+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
3+
* This devtool is neither made for production nor for readable output files.
4+
* It uses "eval()" calls to create a separate source file in the browser devtools.
5+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
6+
* or disable the default devtool with "devtool: false".
7+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
8+
*/
9+
/******/ (() => { // webpackBootstrap
10+
/******/ "use strict";
11+
/******/ var __webpack_modules__ = ({
12+
13+
/***/ "./app/admin.js":
14+
/*!**********************!*\
15+
!*** ./app/admin.js ***!
16+
\**********************/
17+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
18+
19+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _handleSettingsPage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./handleSettingsPage */ \"./app/handleSettingsPage.js\");\n\n\n// Handles store details.\nvar enableStoreDetails = new _handleSettingsPage__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\nwindow.onload = function (e) {\n enableStoreDetails.init();\n};\n\n//# sourceURL=webpack://constant-contact-woocommerce/./app/admin.js?");
20+
21+
/***/ }),
22+
23+
/***/ "./app/handleSettingsPage.js":
24+
/*!***********************************!*\
25+
!*** ./app/handleSettingsPage.js ***!
26+
\***********************************/
27+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28+
29+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ HandleSettingsPage)\n/* harmony export */ });\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/**\n * GuestCheckoutCapture.\n *\n * @package WebDevStudios\\CCForWoo\n * @since 1.2.0\n */\nvar HandleSettingsPage = /*#__PURE__*/function () {\n /**\n * @constructor\n *\n * @author Biplav Subedi <[email protected]>\n * @since 2.0.0\n */\n function HandleSettingsPage() {\n _classCallCheck(this, HandleSettingsPage);\n this.els = {};\n }\n\n /**\n * Init ccWoo admin JS.\n *\n * @author Biplav Subedi <[email protected]>\n * @since 2.0.0\n */\n _createClass(HandleSettingsPage, [{\n key: \"init\",\n value: function init() {\n this.cacheEls();\n this.bindEvents();\n this.enableStoreDetails();\n }\n\n /**\n * Cache some DOM elements.\n *\n * @author Biplav Subedi <[email protected]>\n * @since 2.0.0\n */\n }, {\n key: \"cacheEls\",\n value: function cacheEls() {\n this.els.enableStoreDetails = document.getElementById('cc_woo_save_store_details');\n this.els.optionalFields = document.getElementById('cc-optional-fields');\n }\n\n /**\n * Bind callbacks to events.\n *\n * @author Biplav Subedi <[email protected]>\n * @since 2.0.0\n */\n }, {\n key: \"bindEvents\",\n value: function bindEvents() {\n var _this = this;\n if (null !== this.els.enableStoreDetails) {\n this.els.enableStoreDetails.addEventListener('change', function (e) {\n _this.enableStoreDetails();\n });\n }\n }\n\n /**\n * Captures guest checkout if billing email is valid.\n *\n * @author Biplav Subedi <[email protected]>\n * @since 2.0.0\n */\n }, {\n key: \"enableStoreDetails\",\n value: function enableStoreDetails() {\n if (null !== this.els.enableStoreDetails) {\n if (this.els.enableStoreDetails.checked) {\n console.log(this.els.optionalFields.parentElement);\n this.els.optionalFields.parentElement.style.display = 'block';\n } else {\n this.els.optionalFields.parentElement.style.display = 'none';\n }\n }\n }\n }]);\n return HandleSettingsPage;\n}();\n\n\n//# sourceURL=webpack://constant-contact-woocommerce/./app/handleSettingsPage.js?");
30+
31+
/***/ })
32+
33+
/******/ });
34+
/************************************************************************/
35+
/******/ // The module cache
36+
/******/ var __webpack_module_cache__ = {};
37+
/******/
38+
/******/ // The require function
39+
/******/ function __webpack_require__(moduleId) {
40+
/******/ // Check if module is in cache
41+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
42+
/******/ if (cachedModule !== undefined) {
43+
/******/ return cachedModule.exports;
44+
/******/ }
45+
/******/ // Create a new module (and put it into the cache)
46+
/******/ var module = __webpack_module_cache__[moduleId] = {
47+
/******/ // no module.id needed
48+
/******/ // no module.loaded needed
49+
/******/ exports: {}
50+
/******/ };
51+
/******/
52+
/******/ // Execute the module function
53+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
54+
/******/
55+
/******/ // Return the exports of the module
56+
/******/ return module.exports;
57+
/******/ }
58+
/******/
59+
/************************************************************************/
60+
/******/ /* webpack/runtime/define property getters */
61+
/******/ (() => {
62+
/******/ // define getter functions for harmony exports
63+
/******/ __webpack_require__.d = (exports, definition) => {
64+
/******/ for(var key in definition) {
65+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
66+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
67+
/******/ }
68+
/******/ }
69+
/******/ };
70+
/******/ })();
71+
/******/
72+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
73+
/******/ (() => {
74+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
75+
/******/ })();
76+
/******/
77+
/******/ /* webpack/runtime/make namespace object */
78+
/******/ (() => {
79+
/******/ // define __esModule on exports
80+
/******/ __webpack_require__.r = (exports) => {
81+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
82+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
83+
/******/ }
84+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
85+
/******/ };
86+
/******/ })();
87+
/******/
88+
/************************************************************************/
89+
/******/
90+
/******/ // startup
91+
/******/ // Load entry module and return exports
92+
/******/ // This entry module can't be inlined because the eval devtool is used.
93+
/******/ var __webpack_exports__ = __webpack_require__("./app/admin.js");
94+
/******/
95+
/******/ })()
96+
;

app/bundle.js

Lines changed: 126 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/handleSettingsPage.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export default class HandleSettingsPage {
3838
cacheEls() {
3939
this.els.enableStoreDetails = document.getElementById( 'cc_woo_save_store_details' );
4040
this.els.optionalFields = document.getElementById( 'cc-optional-fields' );
41-
4241
}
4342

4443
/**
@@ -48,9 +47,11 @@ export default class HandleSettingsPage {
4847
* @since 2.0.0
4948
*/
5049
bindEvents() {
51-
this.els.enableStoreDetails.addEventListener( 'change', e => {
52-
this.enableStoreDetails();
53-
} );
50+
if ( null !== this.els.enableStoreDetails ) {
51+
this.els.enableStoreDetails.addEventListener('change', e => {
52+
this.enableStoreDetails();
53+
});
54+
}
5455
}
5556

5657
/**
@@ -60,11 +61,13 @@ export default class HandleSettingsPage {
6061
* @since 2.0.0
6162
*/
6263
enableStoreDetails() {
63-
if (this.els.enableStoreDetails.checked) {
64-
console.log(this.els.optionalFields.parentElement);
65-
this.els.optionalFields.parentElement.style.display = 'block';
66-
} else {
67-
this.els.optionalFields.parentElement.style.display = 'none';
64+
if (null !== this.els.enableStoreDetails) {
65+
if (this.els.enableStoreDetails.checked) {
66+
console.log(this.els.optionalFields.parentElement);
67+
this.els.optionalFields.parentElement.style.display = 'block';
68+
} else {
69+
this.els.optionalFields.parentElement.style.display = 'none';
70+
}
6871
}
6972
}
7073

0 commit comments

Comments
 (0)