| 1 |
export const getShippingMethodOptionId = function ( rateId ) { |
| 2 |
if ( rateId.startsWith( 'packeta_method_' ) ) { |
| 3 |
const [ methodId, instanceId ] = rateId.split( ':' ); |
| 4 |
return 'packetery_carrier_' + methodId.replace( 'packeta_method_', '' ); |
| 5 |
} |
| 6 |
|
| 7 |
return rateId.replace( 'packetery_shipping_method:', '' ); |
| 8 |
}; |
| 9 |
|