Schema & Structured Data for WP & AMP - Version 1.9.82.1

Version Description

(16 July 2021) =

  • Fixed: Call to undefined function ampforwp_saswp_get_the_ID() #1483
  • Fixed: Fatal error: Uncaught Error: Call to undefined method WC_Product_Simple::get_available_variations() #1481
Download this release

Release Info

Developer magazine3
Plugin Icon 128x128 Schema & Structured Data for WP & AMP
Version 1.9.82.1
Comparing to
See all releases

Code changes from version 1.9.82 to 1.9.82.1

admin_section/common-function.php CHANGED
@@ -3639,7 +3639,7 @@ function saswp_update_global_post(){
3639
 
3640
  if( (function_exists('ampforwp_is_front_page') && ampforwp_is_front_page()) && (function_exists('ampforwp_is_amp_endpoint') && ampforwp_is_amp_endpoint()) ){
3641
 
3642
- $page_id = ampforwp_saswp_get_the_ID();
3643
 
3644
  if($page_id){
3645
 
3639
 
3640
  if( (function_exists('ampforwp_is_front_page') && ampforwp_is_front_page()) && (function_exists('ampforwp_is_amp_endpoint') && ampforwp_is_amp_endpoint()) ){
3641
 
3642
+ $page_id = ampforwp_get_the_ID();
3643
 
3644
  if($page_id){
3645
 
output/service.php CHANGED
@@ -4123,27 +4123,31 @@ Class saswp_output_service{
4123
 
4124
  if(method_exists('WC_Product_Simple', 'get_type')){
4125
 
4126
- if($product->get_type() == 'variable'){
4127
 
4128
  $product_id_some = $woocommerce->product_factory->get_product();
4129
-
4130
- $variations = $product_id_some->get_available_variations();
4131
 
4132
- if($variations){
4133
-
4134
- foreach($variations as $value){
 
 
 
 
4135
 
4136
- $product_variation = wc_get_product( $value['variation_id'] );
4137
- $p_inc_tax = $product_variation->get_price_including_tax();
4138
 
4139
- if($p_inc_tax){
4140
- $varible_prices[] = $p_inc_tax;
4141
- }else{
4142
- $varible_prices[] = $value['display_price'];
4143
- }
4144
- }
4145
- }
4146
-
 
 
4147
  }
4148
 
4149
  }
4123
 
4124
  if(method_exists('WC_Product_Simple', 'get_type')){
4125
 
4126
+ if($product->get_type() == 'variable' && class_exists('WC_Product_Variable') ){
4127
 
4128
  $product_id_some = $woocommerce->product_factory->get_product();
 
 
4129
 
4130
+ if($product_id_some instanceof WC_Product_Variable) {
4131
+
4132
+ $variations = $product_id_some->get_available_variations();
4133
+
4134
+ if($variations){
4135
+
4136
+ foreach($variations as $value){
4137
 
4138
+ $product_variation = wc_get_product( $value['variation_id'] );
4139
+ $p_inc_tax = $product_variation->get_price_including_tax();
4140
 
4141
+ if($p_inc_tax){
4142
+ $varible_prices[] = $p_inc_tax;
4143
+ }else{
4144
+ $varible_prices[] = $value['display_price'];
4145
+ }
4146
+ }
4147
+ }
4148
+
4149
+ }
4150
+
4151
  }
4152
 
4153
  }
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
- === Schema & Structured Data for WP & AMP ===
2
  Contributors: magazine3
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.8
6
- Stable tag: 1.9.82
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -120,6 +120,12 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
120
 
121
  == Changelog ==
122
 
 
 
 
 
 
 
123
  = 1.9.82 (15 July 2021) =
124
 
125
  * Added: Option to show LocalBusiness as page content using shortcode, Gutenberg block and widget.
1
+ === Schema & Structured Data for WP & AMP ===
2
  Contributors: magazine3
3
  Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
4
  Requires at least: 3.0
5
  Tested up to: 5.8
6
+ Stable tag: 1.9.82.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
120
 
121
  == Changelog ==
122
 
123
+ = 1.9.82.1 (16 July 2021) =
124
+
125
+ * Fixed: Call to undefined function ampforwp_saswp_get_the_ID() #1483
126
+ * Fixed: Fatal error: Uncaught Error: Call to undefined method WC_Product_Simple::get_available_variations() #1481
127
+
128
+
129
  = 1.9.82 (15 July 2021) =
130
 
131
  * Added: Option to show LocalBusiness as page content using shortcode, Gutenberg block and widget.
structured-data-for-wp.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Schema & Structured Data for WP & AMP
4
  Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
5
- Version: 1.9.82
6
  Text Domain: schema-and-structured-data-for-wp
7
  Domain Path: /languages
8
  Author: Magazine3
@@ -13,7 +13,7 @@ License: GPL2
13
  // Exit if accessed directly.
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
16
- define('SASWP_VERSION', '1.9.82');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
2
  /*
3
  Plugin Name: Schema & Structured Data for WP & AMP
4
  Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
5
+ Version: 1.9.82.1
6
  Text Domain: schema-and-structured-data-for-wp
7
  Domain Path: /languages
8
  Author: Magazine3
13
  // Exit if accessed directly.
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
16
+ define('SASWP_VERSION', '1.9.82.1');
17
  define('SASWP_DIR_NAME_FILE', __FILE__ );
18
  define('SASWP_DIR_NAME', dirname( __FILE__ ));
19
  define('SASWP_DIR_URI', plugin_dir_url(__FILE__));