rebase code on oct-10-2023

This commit is contained in:
Rachit Bhargava
2023-10-10 17:51:46 -04:00
parent b16ad94b69
commit 8f1a2c3a66
2197 changed files with 184921 additions and 35568 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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: {