Home Forums Basel support forum Trying to get property of non-object

Trying to get property of non-object

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2219

    [email protected]
    Participant

    Hi
    All products in my site are with this mensage:

    Notice: Trying to get property of non-object in /home/leinfanti/www/wp-content/themes/Basel Theme/basel/inc/woocommerce.php on line 415

    I don’t know why I’m having this notice.
    Could you help me?
    Thanks

    #2224

    Artem Temos
    Keymaster

    Hello,

    Thank you so much for contacting us.

    Yes, we some small problem in our theme, thank you for your report. We will fix this in next update but as for temporal solution you can find the following code in the file basel/inc/woocommerce.php

    $next = wc_get_product( $next->ID );
    $prev = wc_get_product( $prev->ID );

    and replace with the following

    $next = ( ! empty( $next ) ) ? wc_get_product( $next->ID ) : false;
    $prev = ( ! empty( $prev ) ) ? wc_get_product( $prev->ID ) : false;

    Or you can just ignore this notice until the next update will be released.

    Kind regards,
    Xtemos

    #2232

    [email protected]
    Participant

    Thanks a lot. I fixed by myself before the update with the code you posted.
    Many thanks!

    #2234

    Artem Temos
    Keymaster

    You are welcome, write us when you have any difficulties or issues with our theme.

    And we would be glad if you will rate our theme with 5 stars on themeforest in case you are satisfied with our theme and customer service http://themeforest.net/downloads

    Thank you in advance ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)