This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 13 replies, has 2 voices.

Last updated by patrickW-37 4 months, 3 weeks ago.

Assigned support staff: Bruno.

Author Posts
May 20, 2019 at 4:23 pm #3848841

patrickW-37

hidden link

Fatal error: Uncaught Error: Call to a member function get_cart() on null in /home/funplan/public_html/funplaneo.com/wp-content/plugins/woocommerce-deposits/includes/class-wc-deposits-cart-manager.php:103 Stack trace: #0 /home/funplan/public_html/funplaneo.com/wp-content/plugins/woocommerce-deposits/includes/class-wc-deposits-cart-manager.php(1260): WC_Deposits_Cart_Manager->has_deposit() #1 /home/funplan/public_html/funplaneo.com/wp-includes/class-wp-hook.php(286): WC_Deposits_Cart_Manager->disable_gateways(Array) #2 /home/funplan/public_html/funplaneo.com/wp-includes/plugin.php(208): WP_Hook->apply_filters(Array, Array) #3 /home/funplan/public_html/funplaneo.com/wp-content/plugins/woocommerce/includes/class-wc-payment-gateways.php(160): apply_filters('woocommerce_ava...', Array) #4 /home/funplan/public_html/funplaneo.com/wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-currencies-payment-gateways.php(182): WC_Payment_Gateways->get_available_payment_gateways() #5 /home/funpla in /home/funplan/public_html/funplaneo.com/wp-content/plugins/woocommerce-deposits/includes/class-wc-deposits-cart-manager.php on line 103

Also I can't publish posts when WPML Multilingual CMS and Woocommerce Deposits are both enabled

May 20, 2019 at 4:44 pm #3849035

patrickW-37

WooCommerce Multilingual (plugin by WPML) is also affected

May 20, 2019 at 9:23 pm #3850249

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you for contacting us. I can not replicate this in the WCML testing environment (without using WooCommerce Deposits).

Can you replicate this problem in fresh installation? What steps are you taking to make this problem happen?

Have you tried to keep only WPML (and its add-ons), WC, WCML and WC Deposits, with the other plugins disabled, and with the default theme, to see if the problem persists?

Thank you.

May 20, 2019 at 10:22 pm #3850511

patrickW-37

I can send you zip with plugin so you could test it or I can give you FTP login data.

There is no problem with deposits when I disable WPML Woocommerce Multilingual. I tried to reinstall plugins but with no effect.

May 22, 2019 at 10:19 am #3864173

patrickW-37

Ok so I installed Woocommerce Deposits on your testing environment and there is the same problem as I have.

If you try to add new post (/wp-admin/post.php) there is an error connected with json data (Guttenberg works with json data, there is no problem with page publication)

/wp-json on home page works without fatal error on homepage but I supoose it may be becouse there is no BageBuilder on testing env but json is corrupted anyway.

If you disable WPML Woocommerce Multilingual or Deposits you will able to publish posts again

May 22, 2019 at 10:21 am #3864199

patrickW-37

So it has to be connected with my problems somehow

May 22, 2019 at 9:43 pm #3869521

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you. I got to see the problem you're reporting. To ensure that this plugin is made fully compatible with WPML we need to contact the plugin author and work with him on resolving the issue.

I have forwarded the details to our Themes & Plugins Compatibility Team and they will contact the author. Our Compatibility Team will work with the author of the plugin for this to work properly.

Please note that this process may take a while as it depends on how soon the author will reply to our efforts to contact him.

Thank you.

May 22, 2019 at 11:27 pm #3869717

patrickW-37

It's official Woocommerce plugin so I hope it won't be a problem.

I am waiting for news from you, thanks!

May 23, 2019 at 5:49 pm #3878435

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Our compatibility team is verifying this. At the moment, as a workaround, you can follow the steps below:

- Open the file wp-content/plugins/woocommerce-deposits/includes/class-wc-deposits-cart-manager.php
- At lines 103-107, replace with this code:

if (WC()->cart){
    foreach ( WC()->cart->get_cart() as $cart_item ) {
	if ( ! empty( $cart_item['is_deposit'] ) ) {
	    return true;
	}
    }
}

- Save and upload the changed file

That will fix the problem - I tested it in our testing environment. Our staff is checking out a little more and then we can contact the author of WooCommerce Deposits.

Thank you.

May 23, 2019 at 7:04 pm #3878827

patrickW-37

Seems its working 🙂 Thank you very much!

May 23, 2019 at 7:06 pm #3878833

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

I'm glad it's working properly. Please, let me know if I can help with any other questions you may have about it. I'll be happy to help.

Thank you.

May 23, 2019 at 7:21 pm #3879001

patrickW-37

I have just one more little bit offtop question. Do you know maybe someone who would integrate for me two WP plugins (Bookings and Gifts) or maybe could write a new plugin for me?

May 23, 2019 at 7:26 pm #3879013

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

You can contact one of our certified partners who can develop small to large features for your site: http://wpml.org/documentation/support/wpml-contractors/

Also, we have a list of WPML and WooCommerce Multilingual hooks that can help you develop such feature, which can be seen in the links below:

- https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference
- https://wpml.org/documentation/related-projects/woocommerce-multilingual/wcml-hooks-reference/

Thank you.

May 23, 2019 at 7:38 pm #3879103

patrickW-37

My issue is resolved now. Thank you!