• Resolved xaxill

    (@xaxill)


    Hello,

    First I would like to thank you for your awesome plugin.

    After yesterday update of WooCommerce plugin, variable product pages stoped working.
    It seems that variable $product in your plugins code is getting product title(string) in variable $product. This is before the product is added into cart. Product page of variable product will not render.

    I made quick and dirty fix on this files and lines of code:

    I didn’t investigate problem till the very source of the problem, but this will do for us for now.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter xaxill

    (@xaxill)

    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(
    Plugin Support mialewp

    (@mialewp)

    Hello @xaxill,

    Thanks for contacting us today.

    We just had a quick test with WooCommerce version 8.9.3 and the product variable page still works properly https://tppr.me/UnEeYS

    Can you give us more details on the issue?

    Looking forward to hearing back from you.

    Best regards,

    Mia

    Thread Starter xaxill

    (@xaxill)

    Hello,

    Sorry I didn’t isolate environment to check if this is the case with plugin.
    I have installed 22 theme and checked if error is still there, but didn’t disabled all the plugins as some lose/remove all settings data.

    Will do another test with only 22 theme and your plugin to check if there is some plugin interferance.

    Best

    Plugin Support mialewp

    (@mialewp)

    Hello @xaxill,

    Good day!

    We hope you are doing well.

    Have you solved the issue yet?

    Best regards,

    Mia

    Thread Starter xaxill

    (@xaxill)

    Hello,

    I haven’t had time to analyze further. For us currently stuff works.

    You can marked this thread resolved.

    Best

    Plugin Support alina98

    (@alina98)

    Hi @xaxill,

    Glad to hear that 🙂

    Please do not hesitate to reach out if you need any further help or request.

    Regards,
    Alina

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.