2022-04-20 07:29:29 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
2024-02-28 21:00:52 +00:00
|
|
|
import { createSlotFill } from '@wordpress/components';
|
|
|
|
import { registerPlugin } from '@wordpress/plugins';
|
2022-04-20 07:29:29 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import { PaymentsBannerWrapper } from './payment-settings-banner';
|
2024-02-28 21:00:52 +00:00
|
|
|
import { SETTINGS_SLOT_FILL_CONSTANT } from '../settings/settings-slots';
|
2022-04-20 07:29:29 +00:00
|
|
|
|
2024-02-28 21:00:52 +00:00
|
|
|
const { Fill } = createSlotFill( SETTINGS_SLOT_FILL_CONSTANT );
|
2022-04-20 07:29:29 +00:00
|
|
|
const PaymentsBannerFill = () => {
|
|
|
|
return (
|
|
|
|
<Fill>
|
|
|
|
<PaymentsBannerWrapper />
|
|
|
|
</Fill>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2024-02-28 21:00:52 +00:00
|
|
|
export const registerPaymentsSettingsBannerFill = () => {
|
|
|
|
registerPlugin( 'woocommerce-admin-paymentsgateways-settings-banner', {
|
|
|
|
scope: 'woocommerce-payments-settings',
|
|
|
|
render: PaymentsBannerFill,
|
|
|
|
} );
|
2022-04-20 07:29:29 +00:00
|
|
|
};
|