Docs Advanced Shipment Tracking Pro (AST PRO) Customize ‘Mark as Shipped’ Checkbox Default Behaviour

Customize ‘Mark as Shipped’ Checkbox Default Behaviour

The Add Tracking form includes a Mark as Shipped checkbox that is checked by default. Use the wc_ast_default_mark_shipped filter to uncheck it by default — useful when your workflow requires manual confirmation before changing order status.

Available from AST PRO 5.0.5 onwards. The filter had no effect in earlier versions.

Code snippet

Add to your child theme’s functions.php or a site-specific plugin:

add_filter( 'wc_ast_default_mark_shipped', 'zorem_uncheck_mark_as_shipped_default' );

function zorem_uncheck_mark_as_shipped_default( $checked ) {
    return 0; // 0 = unchecked, 1 = checked
}

Filter reference

ParameterTypeDescription
$checkedintCurrent default state: 1 = checked, 0 = unchecked.
Return valueintReturn 0 to uncheck by default, 1 to keep checked.

Notes

  • This only affects the default state of the checkbox — the user can still check or uncheck it manually before saving tracking.
  • Use a unique callback function name that does not match the filter hook name to avoid confusion.
  • Add this to a child theme or site-specific plugin, not the parent theme — parent theme files are overwritten on updates.