rebase code on oct-10-2023
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import { registerPaymentMethod } from '@woocommerce/blocks-registry';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { getPaymentMethodData } from '@woocommerce/settings';
|
||||
import { getSetting } from '@woocommerce/settings';
|
||||
import { decodeEntities } from '@wordpress/html-entities';
|
||||
|
||||
/**
|
||||
@@ -11,12 +11,12 @@ import { decodeEntities } from '@wordpress/html-entities';
|
||||
*/
|
||||
import { PAYMENT_METHOD_NAME } from './constants';
|
||||
|
||||
const settings = getPaymentMethodData( 'bacs', {} );
|
||||
const settings = getSetting( 'bacs_data', {} );
|
||||
const defaultLabel = __(
|
||||
'Direct bank transfer',
|
||||
'woocommerce'
|
||||
);
|
||||
const label = decodeEntities( settings?.title || '' ) || defaultLabel;
|
||||
const label = decodeEntities( settings.title ) || defaultLabel;
|
||||
|
||||
/**
|
||||
* Content component
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import { registerPaymentMethod } from '@woocommerce/blocks-registry';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { getPaymentMethodData } from '@woocommerce/settings';
|
||||
import { getSetting } from '@woocommerce/settings';
|
||||
import { decodeEntities } from '@wordpress/html-entities';
|
||||
|
||||
/**
|
||||
@@ -11,9 +11,9 @@ import { decodeEntities } from '@wordpress/html-entities';
|
||||
*/
|
||||
import { PAYMENT_METHOD_NAME } from './constants';
|
||||
|
||||
const settings = getPaymentMethodData( 'cheque', {} );
|
||||
const settings = getSetting( 'cheque_data', {} );
|
||||
const defaultLabel = __( 'Check payment', 'woocommerce' );
|
||||
const label = decodeEntities( settings?.title || '' ) || defaultLabel;
|
||||
const label = decodeEntities( settings.title ) || defaultLabel;
|
||||
|
||||
/**
|
||||
* Content component
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import { registerPaymentMethod } from '@woocommerce/blocks-registry';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { getPaymentMethodData } from '@woocommerce/settings';
|
||||
import { getSetting } from '@woocommerce/settings';
|
||||
import { decodeEntities } from '@wordpress/html-entities';
|
||||
|
||||
/**
|
||||
@@ -11,9 +11,9 @@ import { decodeEntities } from '@wordpress/html-entities';
|
||||
*/
|
||||
import { PAYMENT_METHOD_NAME } from './constants';
|
||||
|
||||
const settings = getPaymentMethodData( 'cod', {} );
|
||||
const settings = getSetting( 'cod_data', {} );
|
||||
const defaultLabel = __( 'Cash on delivery', 'woocommerce' );
|
||||
const label = decodeEntities( settings?.title || '' ) || defaultLabel;
|
||||
const label = decodeEntities( settings.title ) || defaultLabel;
|
||||
|
||||
/**
|
||||
* Content component
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import { registerPaymentMethod } from '@woocommerce/blocks-registry';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { getPaymentMethodData, WC_ASSET_URL } from '@woocommerce/settings';
|
||||
import { getSetting, WC_ASSET_URL } from '@woocommerce/settings';
|
||||
import { decodeEntities } from '@wordpress/html-entities';
|
||||
|
||||
/**
|
||||
@@ -11,7 +11,7 @@ import { decodeEntities } from '@wordpress/html-entities';
|
||||
*/
|
||||
import { PAYMENT_METHOD_NAME } from './constants';
|
||||
|
||||
const settings = getPaymentMethodData( 'paypal', {} );
|
||||
const settings = getSetting( 'paypal_data', {} );
|
||||
|
||||
/**
|
||||
* Content component
|
||||
@@ -38,7 +38,7 @@ const paypalPaymentMethod = {
|
||||
edit: <Content />,
|
||||
canMakePayment: () => true,
|
||||
ariaLabel: decodeEntities(
|
||||
settings?.title ||
|
||||
settings.title ||
|
||||
__( 'Payment via PayPal', 'woocommerce' )
|
||||
),
|
||||
supports: {
|
||||
|
||||
Reference in New Issue
Block a user