Documentation
ShipLabel
Developer Reference

Developer Reference


Constants

ConstantDescription
SHIPLABEL_VERSIONPlugin version
SHIPLABEL_FILEAbsolute path to the main plugin file
SHIPLABEL_PATHPlugin directory path
SHIPLABEL_URLPlugin URL
SHIPLABEL_LICENSE_OPTIONOption name storing the license key
SHIPLABEL_LICENSE_STATUS_OPTIONOption name storing the license status

Class Map

ClassFile
ShipLabel_Adminincludes/admin/class-shiplabel-admin.php
ShipLabel_Admin_Bulk_Actionsincludes/admin/class-shiplabel-admin-bulk-actions.php
ShipLabel_Admin_Order_List_Columnincludes/admin/class-shiplabel-admin-order-list-column.php
ShipLabel_Admin_Order_Metaboxincludes/admin/class-shiplabel-admin-order-metabox.php
ShipLabel_REST_Controllerincludes/api/class-shiplabel-rest-controller.php
ShipLabel_Carrier_Baseincludes/carriers/class-shiplabel-carrier-base.php
ShipLabel_USPS_APIincludes/carriers/class-shiplabel-usps-api.php
ShipLabel_FedEx_APIincludes/carriers/class-shiplabel-fedex-api.php
ShipLabel_USPS_Shipping_Providerincludes/carriers/class-shiplabel-usps-shipping-provider.php
ShipLabel_FedEx_Shipping_Providerincludes/carriers/class-shiplabel-fedex-shipping-provider.php
ShipLabel_Settingsincludes/class-shiplabel-settings.php
ShipLabel_Installincludes/class-shiplabel-install.php
ShipLabel_Tracking_Webhookincludes/class-shiplabel-tracking-webhook.php
ShipLabel_Fulfillment_Managerincludes/fulfillment/class-shiplabel-fulfillment-manager.php
ShipLabel_Label_Storeincludes/fulfillment/class-shiplabel-label-store.php

REST Namespace

shiplabel/v1 - see REST API for the full endpoint list.


Cron Events

HookScheduleDescription
shiplabel_sync_tracking_statusesTwice dailyPolls carriers for tracking updates on active labels

AJAX Actions

ActionDescription
shiplabel_save_settingsUnified settings save (all tabs)
shiplabel_reset_settingsReset settings, preserving credentials and shipper address
shiplabel_test_connectionTest USPS/FedEx OAuth credentials
shiplabel_validate_addressValidate an address against USPS or FedEx
shiplabel_license_actionActivate/deactivate the license key

Filters

FilterArgumentsDescription
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()):

KeyDefaultDescription
usps_enabled / fedex_enablednoCarrier master toggles
usps_env / fedex_envproductionproduction or sandbox
usps_default_servicePRIORITY_MAIL-
fedex_default_serviceFEDEX_GROUND-
usps_label_format / fedex_label_formatPDF-
shipper_countryUS-
default_carrieruspsusps or fedex
default_weight_unitoz-
default_dim_unitin-
default_package_typepackage-
auto_generate_labelno-
auto_fulfill_on_labelno-
label_file_retention90Days
debug_modeno-

The webhook secret (shiplabel_webhook_secret) and license key/status are stored as separate options, not inside shiplabel_settings.