Somehow the images I provided won’t show up I am pasting code log from Bitbucket where the code was modified:
plugins/yaypricing/includes/functions/yaydp-core-functions.php
@@ -126,6 +126,9 @@ if ( ! function_exists( 'yaydp_is_variable_product' ) ) {
126126 * @return array
127127 */
128128 function yaydp_is_variable_product( $product ) {
129 if (is_string($product)) {
130 return false;
131 }
129132 return 'variable' === $product->get_type();
130133 }
131134}
@@ -141,6 +144,9 @@ if ( ! function_exists( 'yaydp_is_grouped_product' ) ) {
141144 * @return array
142145 */
143146 function yaydp_is_grouped_product( $product ) {
147 if (is_string($product)) {
148 return false;
149 }
144150 return 'grouped' === $product->get_type();
145151 }
146152}
Modified file
plugins/yaypricing/includes/helper/class-yaydp-product-helper.php
@@ -76,6 +76,9 @@ class YAYDP_Product_Helper {
7676 * @return boolean
7777 */
7878 public static function check_tag( $product, $filter ) {
79 if (is_string($product)) {
80 return false;
81 }
7982 $list_category_id = \YAYDP\Helper\YAYDP_Helper::map_filter_value( $filter );
8083 $product_tags = self::get_product_tags( $product );
8184 $array_intersect = array_intersect( $product_tags, $list_category_id );
@@ -91,6 +94,9 @@ class YAYDP_Product_Helper {
9194 * @return boolean
9295 */
9396 public static function check_price( $product, $filter ) {
97 if (is_string($product)) {
98 return false;
99 }
94100 $product_price = (float) \YAYDP\Helper\YAYDP_Pricing_Helper::get_product_price( $product );
95101 $check = \yaydp_compare_numeric( $product_price, $filter['value'], $filter['comparation'] );
96102 return $check;
@@ -148,6 +154,9 @@ class YAYDP_Product_Helper {
148154 * @return array
149155 */
150156 public static function get_product_tags( $product ) {
157 if (is_string($product)) {
158 return false;
159 }
151160 $result = array();
152161 $product_cats = \get_the_terms( $product->get_id(), 'product_tag' );
153162 $product_cat_ids = array_map(