• Resolved tnanetball

    (@tnanetball)


    Hi, I need help resolving this:

    Warning: in_array() expects parameter 2 to be array, string given in

    }				
    				
    public static function should_load_scripts_on_product_page() {				
    	$prb_locations = self::get_settings( null, 'payment_request_button_locations' ) ?? [ 'product', 'cart' ];			
    	if ( ! in_array( 'product', $prb_locations, true ) ) {			
    		return apply_filters( 'wc_stripe_load_scripts_on_product_page_when_prbs_disabled', true );		
    	}			
    				
    	return true;

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Joey – a11n

    (@jricketts4)

    Hi there – Can you send me a copy of your site’s system status report? You can find that by going to the follow page in your admin dashboard: WooCommerce > Status > ‘Get system report’

    michael.orlitzky

    (@michaelorlitzky)

    I’m not sure why it’s failing to get the setting (I have the same problem), but I think part of the issue is that get_settings() can return the empty string as a last resort; whereas the should_load_* functions are expecting a null if get_settings() fails.

    Robert Ghetau

    (@robertghetau)

    Hey,

    Could you send us a copy of the system status report so we can have a better look at this? This can be found in WooCommerce > Status > ‘Get system report’.

    If you’re more comfortable, you can also open a new ticket from here:

    https://woocommerce.com/my-account/create-a-ticket/

    Hi there,

    We’ve not heard back from you in a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Thank you ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Warning: in_array() expects parameter 2 to be array, string given in’ is closed to new replies.