Developer Reference
Constants
| Constant | Description |
|---|---|
SHIPLABEL_VERSION | Plugin version |
SHIPLABEL_FILE | Absolute path to the main plugin file |
SHIPLABEL_PATH | Plugin directory path |
SHIPLABEL_URL | Plugin URL |
SHIPLABEL_LICENSE_OPTION | Option name storing the license key |
SHIPLABEL_LICENSE_STATUS_OPTION | Option name storing the license status |
Class Map
| Class | File |
|---|---|
ShipLabel_Admin | includes/admin/class-shiplabel-admin.php |
ShipLabel_Admin_Bulk_Actions | includes/admin/class-shiplabel-admin-bulk-actions.php |
ShipLabel_Admin_Order_List_Column | includes/admin/class-shiplabel-admin-order-list-column.php |
ShipLabel_Admin_Order_Metabox | includes/admin/class-shiplabel-admin-order-metabox.php |
ShipLabel_REST_Controller | includes/api/class-shiplabel-rest-controller.php |
ShipLabel_Carrier_Base | includes/carriers/class-shiplabel-carrier-base.php |
ShipLabel_USPS_API | includes/carriers/class-shiplabel-usps-api.php |
ShipLabel_FedEx_API | includes/carriers/class-shiplabel-fedex-api.php |
ShipLabel_USPS_Shipping_Provider | includes/carriers/class-shiplabel-usps-shipping-provider.php |
ShipLabel_FedEx_Shipping_Provider | includes/carriers/class-shiplabel-fedex-shipping-provider.php |
ShipLabel_Settings | includes/class-shiplabel-settings.php |
ShipLabel_Install | includes/class-shiplabel-install.php |
ShipLabel_Tracking_Webhook | includes/class-shiplabel-tracking-webhook.php |
ShipLabel_Fulfillment_Manager | includes/fulfillment/class-shiplabel-fulfillment-manager.php |
ShipLabel_Label_Store | includes/fulfillment/class-shiplabel-label-store.php |
REST Namespace
shiplabel/v1 - see REST API for the full endpoint list.
Cron Events
| Hook | Schedule | Description |
|---|---|---|
shiplabel_sync_tracking_statuses | Twice daily | Polls carriers for tracking updates on active labels |
AJAX Actions
| Action | Description |
|---|---|
shiplabel_save_settings | Unified settings save (all tabs) |
shiplabel_reset_settings | Reset settings, preserving credentials and shipper address |
shiplabel_test_connection | Test USPS/FedEx OAuth credentials |
shiplabel_validate_address | Validate an address against USPS or FedEx |
shiplabel_license_action | Activate/deactivate the license key |
Filters
| Filter | Arguments | Description |
|---|---|---|
shiplabel_fulfillment_class | $class (string) | Override the WooCommerce Fulfillment class ShipLabel instantiates in Order Fulfillments Mode |
Default Settings
Stored in the shiplabel_settings option (ShipLabel_Settings::defaults()):
| Key | Default | Description |
|---|---|---|
usps_enabled / fedex_enabled | no | Carrier master toggles |
usps_env / fedex_env | production | production or sandbox |
usps_default_service | PRIORITY_MAIL | - |
fedex_default_service | FEDEX_GROUND | - |
usps_label_format / fedex_label_format | PDF | - |
shipper_country | US | - |
default_carrier | usps | usps or fedex |
default_weight_unit | oz | - |
default_dim_unit | in | - |
default_package_type | package | - |
auto_generate_label | no | - |
auto_fulfill_on_label | no | - |
label_file_retention | 90 | Days |
debug_mode | no | - |
The webhook secret (shiplabel_webhook_secret) and license key/status are stored as separate options, not inside shiplabel_settings.