• When product is added to the basket and basket page is displayed, there is a error on top of the basket page element (and options in payment selection area cannot be changed):

    Warning: in_array() expects parameter 2 to be array, null given in /data/web/virtuals/31080/virtual/www/wp-content/plugins/woocommerce-pay-for-payment/woocommerce-payforpayment.php on line 114

    I’m using the latest WP/woocomerce. Sometimes the error disappears (after logging in/out and refresh).

    Thanks!

    https://www.ads-software.com/plugins/woocommerce-pay-for-payment/

Viewing 4 replies - 1 through 4 (of 4 total)
  • What version of the plugin are you using, latest?
    Also what theme have you installed?
    Do you use free shipping, what shipping methods do you have enabled?

    Thread Starter scurixx

    (@scurixx)

    Yes, latest 1.3.5.
    I don’t think the error was there before recently when I upgraded to the latest versions of WP and woo…
    I’m using Sirens theme.
    Yes, I’m using free shipping. I’ve enabled local-delivery, free-shipping and international-deliver.

    Try replacing line 114 with this
    $chosen_methods= WC()->session->get( ‘chosen_shipping_methods’ ));
    if (is_null($chosen_methods))
    {
    $chosen_methods=[];
    }

    if ( ! $disable_on_free_shipping || ! in_array( ‘free_shipping’ , $chosen_methods) ) {

    If it works tell me to make a pull request it in github.

    Thread Starter scurixx

    (@scurixx)

    It works – thanks!

    First line has an extra closing bracket that needs to be removed ->

    $chosen_methods= WC()->session->get( ‘chosen_shipping_methods’ );

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error on top of the basket page’ is closed to new replies.