Auto Terms of Service and Privacy Policy - Version 2.2.1

Version Description

Download this release

Release Info

Developer wpautoterms
Plugin Icon Auto Terms of Service and Privacy Policy
Version 2.2.1
Comparing to
See all releases

Code changes from version 2.2.0 to 2.2.1

README.txt CHANGED
@@ -4,7 +4,7 @@ Tags: gdpr, privacy policy, terms and conditions, terms of service, terms of use
4
  Requires at least: 4.2
5
  Tested up to: 4.9.7
6
  Requires PHP: 5.3
7
- Stable tag: 2.2.0
8
  License: GPL version 3 or any later version
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -113,9 +113,15 @@ Installing the plugin is easy. Just follow these steps:
113
 
114
  == Changelog ==
115
 
 
 
 
 
 
 
116
  = Version 2.2.0 =
117
  * Oct 1, 2018
118
- * Fix body oepning tag not found error
119
 
120
  = Version 2.1.9 =
121
  * Sep 23, 2018
4
  Requires at least: 4.2
5
  Tested up to: 4.9.7
6
  Requires PHP: 5.3
7
+ Stable tag: 2.2.1
8
  License: GPL version 3 or any later version
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
113
 
114
  == Changelog ==
115
 
116
+ = Version 2.2.1 =
117
+ * Nov 09, 2018
118
+ * Allow for the license key to be used on multiple websites
119
+ * Show WP AutoTerms created Legal Pages in WooCommerce Settings
120
+ * Show WP AutoTerms created Legal Pages in WP > Settings > Privacy tab
121
+
122
  = Version 2.2.0 =
123
  * Oct 1, 2018
124
+ * Fix body opening tag not found error
125
 
126
  = Version 2.1.9 =
127
  * Sep 23, 2018
api.php CHANGED
@@ -12,5 +12,5 @@ define( 'WPAUTOTERMS_PURCHASE_URL', 'https://app.wpautoterms.com/product/v1/buy'
12
  | DO NOT MODIFY
13
  |
14
  */
15
- // define( 'WPAUTOTERMS_API_URL', 'http://127.0.0.1:5000/' );
16
  //define( 'WPAUTOTERMS_PURCHASE_URL', 'http://127.0.0.1:5000/product/v1/buy' );
12
  | DO NOT MODIFY
13
  |
14
  */
15
+ //define( 'WPAUTOTERMS_API_URL', 'http://127.0.0.1:5000/' );
16
  //define( 'WPAUTOTERMS_PURCHASE_URL', 'http://127.0.0.1:5000/product/v1/buy' );
auto-terms-of-service-privacy-policy.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://wpautoterms.com
5
  Description: Create Privacy Policy (Simple or GDPR), Terms & Conditions, Disclaimers and more. Compliance Kits to help you be compliant with the law.
6
  Author: WP AutoTerms
7
  Author URI: https://wpautoterms.com
8
- Version: 2.2.0
9
  License: GPLv2 or later
10
  Text Domain: wpautoterms
11
  Domain Path: /languages
5
  Description: Create Privacy Policy (Simple or GDPR), Terms & Conditions, Disclaimers and more. Compliance Kits to help you be compliant with the law.
6
  Author: WP AutoTerms
7
  Author URI: https://wpautoterms.com
8
+ Version: 2.2.1
9
  License: GPLv2 or later
10
  Text Domain: wpautoterms
11
  Domain Path: /languages
includes/admin/admin.php CHANGED
@@ -48,6 +48,7 @@ abstract class Admin {
48
  add_filter( 'pre_update_option', array( __CLASS__, 'fix_update' ), 10, 3 );
49
  add_filter( 'get_sample_permalink_html', array( __CLASS__, 'remove_permalink' ), 10, 5 );
50
  add_action( 'edit_form_top', array( __CLASS__, 'edit_form_top' ) );
 
51
 
52
  Notices::init( WPAUTOTERMS_OPTION_PREFIX . 'notices' );
53
 
@@ -63,6 +64,21 @@ abstract class Admin {
63
  static::$_license->check();
64
  }
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  public static function add_meta_boxes() {
67
  global $post;
68
 
48
  add_filter( 'pre_update_option', array( __CLASS__, 'fix_update' ), 10, 3 );
49
  add_filter( 'get_sample_permalink_html', array( __CLASS__, 'remove_permalink' ), 10, 5 );
50
  add_action( 'edit_form_top', array( __CLASS__, 'edit_form_top' ) );
51
+ add_filter( 'get_pages', array( __CLASS__, 'update_wp_builtin_pp' ), 10, 2 );
52
 
53
  Notices::init( WPAUTOTERMS_OPTION_PREFIX . 'notices' );
54
 
64
  static::$_license->check();
65
  }
66
 
67
+ public static function update_wp_builtin_pp( $pages, $r ) {
68
+ if ( ! isset( $r['name'] ) || !in_array( $r['name'], array(
69
+ 'wp_page_for_privacy_policy',
70
+ 'page_for_privacy_policy',
71
+ 'woocommerce_terms_page_id'
72
+ ) ) ) {
73
+ return $pages;
74
+ }
75
+ $r['post_type'] = CPT::type();
76
+ $r['name'] = WPAUTOTERMS_SLUG . '_page_for_privacy_policy';
77
+ $autoterms_pages = get_pages( $r );
78
+
79
+ return array_merge( $pages, $autoterms_pages );
80
+ }
81
+
82
  public static function add_meta_boxes() {
83
  global $post;
84