frontend.js in Route ‑ Shipping Protection 2.4.18, at blocks/route-protection/frontend.js
| 1 | ( function ( wc ) { |
| 2 | if ( |
| 3 | ! wc || |
| 4 | ! wc.blocksCheckout || |
| 5 | typeof wc.blocksCheckout.registerCheckoutFilters !== 'function' |
| 6 | ) { |
| 7 | return; |
| 8 | } |
| 9 | |
| 10 | wc.blocksCheckout.registerCheckoutFilters( 'route-protection-frontend', { |
| 11 | additionalCartCheckoutInnerBlockTypes: function ( |
| 12 | value, |
| 13 | extensions, |
| 14 | args |
| 15 | ) { |
| 16 | if ( ! Array.isArray( value ) ) { |
| 17 | value = []; |
| 18 | } |
| 19 | if ( value.indexOf( 'route/route-protection' ) === -1 ) { |
| 20 | value.push( 'route/route-protection' ); |
| 21 | } |
| 22 | return value; |
| 23 | }, |
| 24 | } ); |
| 25 | } )( window.wc ); |
| 26 |