nShift - Hooks (Filters)
Hooks in WordPress essentially allow you to change or add code without editing core files. They are used extensively throughout WordPress and WooCommerce and are very useful for developers.
Settings Filter
Filter: 'ac_wc_unifaun_general_settings'
Parameters:
$settings Array containing the plugin settings
Description: Fired when the plugin is loaded.
Instance Settings Filter
Filter: 'ac_wc_unifaun_instance_settings'
Parameters:
$form_fields Array containing the plugin settings
Description: Fired when the plugin is loaded.
Return label Date Diff Filter
Filter: 'ac_wc_unifaun_return_label_date_diff'
Parameters:
$default_value integer containing the default value
$order WC_Orderobject related to the order
Description: This could be used if you want to extend or shorten how long the "Return label" button is displayed
Orderlist display PDF
Filter: 'ac_wc_unifaun_order_list_display_download_pdf'
Parameters:
$default_value boolean containing the default value
$order WC_Orderobject related to the order
Description: This could be used if you want to hide the label button on certain orders
Track and Trace URL
Filter: 'ac_wc_unifaun_track_and_trace_url'
Parameters:
$url string containing the default url
$order WC_Orderobject related to the order
Description: This could be used if you want to customize the url for certain orders
Shipment Product Parcel Data
Filter: 'ac_wc_unifaun_shipment_product_parcel_data'
Parameters:
$parcel array containing the parcel data
$product WC_Productproduct related to the parcel
$item WC_Order_Item_Productitem related to the parcel
$order WC_Orderobject related to the order
$shipping_method WC_Shippingshipping method related to the order
Description: This could be used if you want to customize parcel data per product
Shipment Single Parcel Data
Filter: 'ac_wc_unifaun_shipment_single_parcel_data'
Parameters:
$parcel array containing the parcel data
$order WC_Orderobject related to the order
$shipping_method WC_Shippingshipping method related to the order
Description: This could be used if you want to customize parcel data
Shipment Customs Declaration Line Data
Filter: 'ac_wc_unifaun_shipment_customs_declaration_line'
Parameters:
$line array containing the parcel data
$shipment array containing the parcel data
$order WC_Orderobject related to the order
$product WC_Productproduct related to the line
$item WC_Order_Item_Productitem related to the line
Description: This could be used if you want to customize declaration line data
Shipment Data
Filter: 'ac_wc_unifaun_shipment_data'
Parameters:
$shipment array containing the shipmentdata
$order WC_Orderobject related to the order
Description: This could be used if you want to customize shipment data
Shipment PDF Config Data
Filter: 'ac_wc_unifaun_shipment_pdf_config_data'
Parameters:
$pdf_config array containing the pdf config
$order WC_Orderobject related to the order
Description: This could be used if you want to customize the document sizes
Return Label Parcel Weight
Filter: 'ac_wc_unifaun_return_label_parcel_weight'
Parameters:
$default_value float containing the default weight
$order WC_Orderobject related to the order
Description: This could be used if you want to customize the return weight
Return Shipment Data
Filter: 'ac_wc_unifaun_return_shipment_data'
Parameters:
$shipment array containing the shipmentdata
$order WC_Orderobject related to the order
Description: This could be used if you want to customize shipment data