Enable Accessibility Features
- functions.php:
//* Enable Genesis Accessibility Components
add_theme_support( 'genesis-accessibility', array( '404-page', 'drop-down-menu', 'headings', 'rems', 'search-form', 'skip-links' ) );
/** | |
* External dependencies | |
*/ | |
import { | |
createContext, | |
useContext, | |
useReducer, | |
useRef, | |
useMemo, |
/** | |
* External dependencies | |
*/ | |
import { registerPlugin } from '@wordpress/plugins'; | |
import { ExperimentalOrderLocalPickupPackages } from '@woocommerce/blocks-checkout'; | |
const render = () => { | |
return ( | |
<ExperimentalOrderLocalPickupPackages> | |
<div> |
/** | |
* External dependencies | |
*/ | |
import { registerPlugin } from '@wordpress/plugins'; | |
import { ExperimentalOrderMeta } from '@woocommerce/blocks-checkout'; | |
const render = () => { | |
return ( | |
<ExperimentalOrderMeta> | |
<div class="wc-block-components-totals-wrapper"> |
/** | |
* External dependencies | |
*/ | |
import { registerPlugin } from '@wordpress/plugins'; | |
import { ExperimentalDiscountsMeta } from '@woocommerce/blocks-checkout'; | |
const render = () => { | |
return ( | |
<ExperimentalDiscountsMeta> | |
<div class="wc-block-components-totals-wrapper"> |
/** | |
* External dependencies | |
*/ | |
import { registerPlugin } from '@wordpress/plugins'; | |
import { ExperimentalOrderShippingPackages } from '@woocommerce/blocks-checkout'; | |
const render = () => { | |
return ( | |
<ExperimentalOrderShippingPackages> | |
<div> |
const { registerCheckoutFilters } = window.wc.blocksCheckout; | |
// Replace coupon label for matching coupon(s). | |
registerCheckoutFilters( 'example-extension', { | |
coupons: ( coupons ) => { | |
return coupons.map( ( coupon ) => { | |
// Regex to match autocoupon then unlimited undersores and numbers | |
if ( ! coupon.label.match( /autocoupon(?:_\d+)+/ ) ) { | |
return coupon; | |
} |
const { registerCheckoutFilters } = window.wc.blocksCheckout; | |
// Adjust cart item class of the order summary items. | |
registerCheckoutFilters( 'example-extension', { | |
cartItemClass: ( value, extensions, args ) => { | |
// Return early since this filter is not being applied in the Summary context. | |
// We must return the original value we received here. | |
if ( args?.context !== 'summary' ) { | |
return value; | |
} |
const { registerCheckoutFilters } = window.wc.blocksCheckout; | |
// Adjust subtotal price format of the order summary items. | |
registerCheckoutFilters( 'example-extension', { | |
subtotalPriceFormat: ( value, extensions, args ) => { | |
// Return early since this filter is not being applied in the Summary context. | |
// We must return the original value we received here. | |
if ( args?.context !== 'summary' ) { | |
return value; | |
} |
const { registerCheckoutFilters } = window.wc.blocksCheckout; | |
// Adjust cart item price of the order summary items. | |
registerCheckoutFilters( 'example-extension', { | |
cartItemPrice: ( value, extensions, args ) => { | |
// Return early since this filter is not being applied in the Summary context. | |
// We must return the original value we received here. | |
if ( args?.context !== 'summary' ) { | |
return value; | |
} |