Bug: Member has protected access
-
Hi,
please check the file
class-wc-product-compatibility.php
line 47:return $product->is_type( 'variation' ) ? $product->variation_id : $product->id;
Must be changed to:
return $product->is_type( 'variation' ) ? $product->variation_id : $product->get_id();
You can also simplify the whole function a bit:
public static function get_id( \WC_Product $product ) { if ( method_exists( $product, 'get_id' ) ) { return $product->get_id(); } return $product->is_type( 'variation' ) ? $product->variation_id : $product->get_id(); }
You need to test it but it should be fine.
Thanks for you support!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Bug: Member has protected access’ is closed to new replies.