Skip to content

Instantly share code, notes, and snippets.

@fivestarplugins
Created February 9, 2023 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fivestarplugins/6e5b8d81cf5d24ce542422344f523160 to your computer and use it in GitHub Desktop.
Save fivestarplugins/6e5b8d81cf5d24ce542422344f523160 to your computer and use it in GitHub Desktop.
Example of how to use the fdm_order_statuses filter
// Example of how to use the fdm_order_statuses filter to add a custom order status called "Quality Check" in the Five Star Restaurant Menu plugin.
// In this example, the slug of the new status is fdm_order_quality_check.
// The value (90) is used to fill in the tracking graphic.
// The label is the name of the status as you want it to appear on your site.
function add_quality_check_status( $order_statuses ) {
$order_statuses['fdm_order_quality_check'] = array(
'label' => 'Quality Check',
'value' => 90,
);
return $order_statuses;
}
add_filter( 'fdm_order_statuses', 'add_quality_check_status' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment