fix: wcadmin react18 createroot print shipping banner (#48831)
Co-authored-by: André Kallehauge <3846700+kallehauge@users.noreply.github.com>
This commit is contained in:
parent
3425a2c017
commit
e770aef3fe
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { render } from '@wordpress/element';
|
||||
import { createRoot } from '@wordpress/element';
|
||||
import { withPluginsHydration } from '@woocommerce/data';
|
||||
|
||||
/**
|
||||
|
@ -19,4 +19,7 @@ const HydratedShippingBanner = withPluginsHydration( {
|
|||
...getAdminSetting( 'plugins' ),
|
||||
jetpackStatus: getAdminSetting( 'dataEndpoints', {} ).jetpackStatus,
|
||||
} )( ShippingBanner );
|
||||
render( <HydratedShippingBanner itemsCount={ args.items } />, metaBox );
|
||||
|
||||
createRoot( metaBox ).render(
|
||||
<HydratedShippingBanner itemsCount={ args.items } />
|
||||
);
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Changed from using React.render to React.createRoot for print shipping banner as it has been deprecated since React 18
|
Loading…
Reference in New Issue