mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
Suppress WP_HTML_Tag_Processor Psalm error as the class exists
This commit is contained in:
parent
0e4ef8b64a
commit
1025df779f
1 changed files with 6 additions and 2 deletions
|
@ -12,7 +12,6 @@ declare(strict_types=1);
|
|||
namespace WooCommerce\PayPalCommerce\PayLaterBlock;
|
||||
|
||||
use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
|
||||
use WP_HTML_Tag_Processor;
|
||||
|
||||
/**
|
||||
* Class PayLaterBlockRenderer
|
||||
|
@ -31,7 +30,12 @@ class PayLaterBlockRenderer {
|
|||
|
||||
$html = '<div id="' . esc_attr( $attributes['id'] ?? '' ) . '" class="ppcp-messages" data-partner-attribution-id="Woo_PPCP"></div>';
|
||||
|
||||
$processor = new WP_HTML_Tag_Processor( $html );
|
||||
/**
|
||||
* Class exist in WordPress.
|
||||
*
|
||||
* @psalm-suppress UndefinedClass
|
||||
*/
|
||||
$processor = new \WP_HTML_Tag_Processor( $html );
|
||||
|
||||
if ( $processor->next_tag( 'div' ) ) {
|
||||
$layout = $attributes['layout'] ?? 'text';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue