__internal_woocommerce_blocks_deregister_checkout_field()
Deregister a checkout field.
Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.
No Hooks.
Return
null
. Nothing (null).
Usage
__internal_woocommerce_blocks_deregister_checkout_field( $field_id );
- $field_id(string) (required)
- Field ID.
__internal_woocommerce_blocks_deregister_checkout_field() internal woocommerce blocks deregister checkout field code WC 9.6.1
function __internal_woocommerce_blocks_deregister_checkout_field( $field_id ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore $checkout_fields = Package::container()->get( CheckoutFields::class ); $result = $checkout_fields->deregister_checkout_field( $field_id ); if ( is_wp_error( $result ) ) { throw new \Exception( esc_attr( $result->get_error_message() ) ); } }