The following is a list of all hooks present in the plugin. This list is intended to guide developers who are looking to extend the functionality of Custom Order Number plugin.
1. How to add text in Manual Order Number Counter?
Hook:
alg_wc_custom_order_number_input_type :
Usage:
add_filter( 'alg_wc_custom_order_number_input_type', 'change_order_number_input_type_meta_box' );
Parameters: None
Example:
add_filter( 'alg_wc_custom_order_number_input_type', 'change_order_number_input_type_meta_box' ); function change_order_number_input_type_meta_box() { return 'text'; }
2. Fetching Custom Order Number from Meta Key
Meta Key:
_alg_wc_full_custom_order_number
Description:
This meta key stores the full custom order number assigned by the plugin. It can be retrieved using the get_post_meta() function in WooCommerce.
3. How to Retrieve the Custom Order Number in Third-Party Plugins
If a third-party plugin is fetching the order ID instead of the custom order number, their development team needs to modify their code accordingly.
Solution:
The third-party plugin should replace their existing order ID retrieval code with the following:
$custom_order_number = $order->get_order_number();