• Resolved CrazySerb

    (@crazyserb)


    The minute I upgraded to latest WooCommerce 6.6.0, this error popped up on every page of the website:

    Fatal error: Uncaught TypeError: Argument 1 passed to Automattic\WooCommerce\Internal\Utilities\HtmlSanitizer::sanitize() must be of the type string, null given, called in /home/pps/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-payment-gateway.php on line 308 and defined in /home/pps/public_html/wp-content/plugins/woocommerce/src/Internal/Utilities/HtmlSanitizer.php:51 Stack trace: #0 /home/pps/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-payment-gateway.php(308): Automattic\WooCommerce\Internal\Utilities\HtmlSanitizer->sanitize(NULL, Array) #1 /home/pps/public_html/wp-content/plugins/woo-payment-gateway/includes/gateways/settings/local-payment-settings.php(20): WC_Payment_Gateway->get_title() #2 /home/pps/public_html/wp-content/plugins/woo-payment-gateway/includes/abstract/abstract-class-wc-braintree-local-payment-gateway.php(55): include('/home/pps/publi...') #3 /home/pps/public_html/wp-content/plugins/woo-payment-gateway/includes/abstract/abstract-class-wc-braint in /home/pps/public_html/wp-content/plugins/woocommerce/src/Internal/Utilities/HtmlSanitizer.php on line 51

    Might wanna look into it and release some sort of a fix soon…

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    @crazyserb The error is being triggered because WC added a new line of code to their WC_Payment_Gateway class. I suspect there will be many other gateways affected by this added line of code since it’s requiring a type on a value that previously did not need one.

    public function get_title() {
    	$title = wc_get_container()->get( HtmlSanitizer::class )->sanitize( $this->title, HtmlSanitizer::LOW_HTML_BALANCED_TAGS_NO_LINKS );
    	return apply_filters( 'woocommerce_gateway_title', $title, $this->id );
    }

    We’ll release an update soon.

    @mrclayton Thanks for the quick reply. We are anxiously awaiting an update! ??

    Plugin Author Payment Plugins

    (@mrclayton)

    Version 3.2.35 released.

    @mrclayton Awesome, thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘This plugin breaks the latest WooCommerce update’ is closed to new replies.