Upgrade Marketpress Broke WordPress Menu

When I updated Marketpress it appears to have broken the site. The front page shows up but the Login / WordPress Menu Bar at the top of the screen no longer appears. When I disable the Marketpress plugin it works fine so the issue appears to be with Marketpress.

At the bottom of the page there appears the following error message:

Fatal error: Error! MarketPress doesn’t have a get_cart_contents method. in /home/saleencl/public_html/wp-content/plugins/marketpress/marketpress.php on line 937

  • Milan
    • WordPress Wizard

    Hello Benjamin,

    I hope you are having a good day and thanks for asking us. :slight_smile:

    f I am not wrong you are referring "Login" menu bar as admin bar which is shown in this attached screenshot right ?

    If this is the case then first of all let me tell you from where that bar is coming on front end. Its BuddyPress who is responsible for that bar rendering, but somehow you are saying that enabling marketpress is removing that bar right ? Is this the case or there is some other menu which is being hidden by Marketpress ? Please advice further.

    Looking forward to hearing back,

    Kind Regards,

    Milan

  • Predrag Dubajic
    • Support

    Hi Benjamin,

    Do you have any additional plugins that integrate with MP or theme perhaps?

    Can you try adding making below change to MP plugin and see if it works after that.

    Go to /marketpress/includes/common/class-mp-cart.php and change line 1212 from this:

    if ( ( ! mp_is_shop_page() || mp_is_shop_page( 'cart' ) || mp_is_shop_page( 'checkout' ) ) && ! mp_doing_ajax() ) {

    To this:

    if ( ( mp_is_shop_page( 'cart' ) || mp_is_shop_page( 'checkout' ) ) && ! mp_doing_ajax() ) {

    And see if it’s working after that.

    Best regards,

    Predrag

  • Bencstrs
    • WPMU DEV Initiate

    Unfortunately that did not work. I am still getting the below error message:

    Fatal error: Error! MarketPress doesn’t have a get_cart_contents method. in /home/saleencl/public_html/wp-content/plugins/marketpress/marketpress.php on line 937

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.