Programatically create new checkout field type

You are here:
← All Topics

This article belongs to our plugin : WooCommerce Easy Checkout Field Editor

Disclaimer :- This section is indended for developers only.

This is a sample plugin with code on how you can add your custom field type to existing field type to WooCommerce Easy Checkout Field Editor.

WooCommerce easy checkout field editor comes with following hooks which can be used to extend functionality in frontend and backend.

  • pcfme_override_field_types – to add new field type to existing field types with one params $field_types

params $field_types (existing field types) ,

returns $field_types

  • pcfme_after_visibility_content_tr – add custom field type option field to be shown after visibility dropdown

3 params

$slug – billing, shipping or additional

$key – Field Key

$field – Field Value

 

Sample Plugin on Github

Sidebar