Programming (Actions and Filters)

This plugin gives you the possibility to customize and modify different parts of the the programming code. Similar to other plugins, we use actions and filters for this:

includes/wc-product-serialnumber-functions.php
do_action( 'wc_product_serialnumber_created', $post_id ); Product Serialnumber Created
do_action( 'wc_product_serialnumber_save_post', $post_id ); Product Serialnumber Before saving Post
do_action( 'woocommerce_before_delete_product_serialnumber_item', $item_id ); Product Serialnumber Item before it gets deleted
do_action( 'woocommerce_delete_product_serialnumber_item', $item_id ); Product Serialnumber Item delete

 

includes/admin/class-wc-product-serialnumber-admin-meta-boxes.php
do_action( 'woocommerce_save_product_serialnumber_meta_boxes', $post_id, $post ); Product Serialnumber Saving the Meta Boxes

 

includes/admin/class-wc-shipment-admin-meta-boxes.php
do_action( 'woocommerce_save_shipment_meta_boxes', $post_id, $post ); Supplier Shipment Saving the Meta Boxes

 

includes/admin/meta-boxes/views/html-product-serialnumber-orders.php
do_action( 'woocommerce_admin_order_data_after_billing_address', $order ); Product Serialnumber add information after billing address
do_action( 'woocommerce_admin_order_data_after_shipping_address', $order ); Product Serialnumber add information after shipping address

 

includes/admin/meta-boxes/views/html-product-serialnumber-order-item.php
do_action( 'woocommerce_admin_order_item_headers', $order ); Product Serialnumber related order item data

 

includes/admin/meta-boxes/class-wc-shipment-meta-box-shipment-data.php
do_action( 'wc_product_serialnumber_meta_box_shipment_data_start', $post, $shipment ); Supplier Shipment data start
do_action( 'wc_product_serialnumber_meta_box_shipment_data_end', $post, $shipment ); Supplier Shipment data end

 

includes/class-wc-product-serialnumber-ajax.php
do_action( 'woocommerce_product_serialnumber_save_product_serialnumber_ajax', $product_serialnumber, $pl_item_id); Save serialnumber via ajax
includes/admin/meta-boxes/class-wc-product-serialnumber-meta-box-comments.php
apply_filters( 'wc_product_serialnumber_note_class', $note_classes, $note ); Product Serialnumber Note Class

 

includes/admin/meta-boxes/class-wc-product-serialnumber-meta-box-tabs.php
apply_filters( 'wc_product_serialnumber_tabs', array() ); Product Serialnumber Tabs
apply_filters( 'woocommerce_product_' . $key . '_tab_title', esc_html( $tab['title'] ), $key ); Product Tab Title By Key

 

includes/admin/meta-boxes/class-wc-shipment-meta-box-comments.php
apply_filters( 'wc_shipment_note_class', $note_classes, $note ); Shipment Note Class

 

includes/admin/meta-boxes/class-wc-shipment-meta-box-shipment-data.php
apply_filters( 'wc_product_serialnumber_meta_box_shipment_data_show_created_by', true ); Product Serialnumber Meta Box Shipment Data Show Created By
apply_filters( 'wc_product_serialnumber_meta_box_shipment_data_show_arrived_on', true ); Product Serialnumber Meta Box Shipment Data Show Arrived On
apply_filters( 'wc_product_serialnumber_meta_box_shipment_data_arrived_on', $arrived_on ); Product Serialnumber Meta Box Shipment Data Arrived On
apply_filters( 'woocommerce_date_input_html_pattern', '[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])' ); Date Input HTML Pattern
apply_filters( 'wc_product_serialnumber_meta_box_shipment_data_show_registered_by', true ); Product Serialnumber Meta Box Shipment Data Show Registered By
apply_filters( 'wc_product_serialnumber_meta_box_shipment_data_registered_by', $registered_by ); Product Serialnumber Meta Box Shipment Data Registered By
apply_filters( 'wc_product_serialnumber_meta_box_shipment_data_roles_in', $roles_in ); Product Serialnumber Meta Box Shipment Data Roles In
apply_filters( 'wc_product_serialnumber_meta_box_shipment_data_show_supplier_order_ids', true ); Product Serialnumber Meta Box Shipment Data Show Supplier Order IDs
apply_filters( 'wc_product_serialnumber_meta_box_shipment_data_supplier_order_ids', $supplier_order_ids ); Product Serialnumber Meta Box Shipment Data Supplier Order IDs

 

includes/admin/meta-boxes/views/html-product-item.php
apply_filters( 'woocommerce_admin_html_order_item_class', ( ! empty( $class ) ? $class : '' ), $product ); Admin HTML Order Item Class
apply_filters( 'woocommerce_admin_order_item_thumbnail', $product->get_image( 'shop_thumbnail', array( 'title' => '' ) ), $product_id, $product ); Admin Order Item Thumbnail

 

includes/admin/meta-boxes/views/html-product-serialnumber-customer-address.php
apply_filters( 'woocommerce_my_account_get_addresses', array(
'billing' => __( 'Billing Address', 'woocommerce' ),
'shipping' => __( 'Shipping Address', 'woocommerce' )
), $customer_id );
My Account Get Addresses

 

includes/admin/meta-boxes/views/html-shipment-supplier.php
apply_filters( 'wc_product_serialnumber_meta_box_shipment_supplier_roles_in', $roles_in ); Product Serialnumber Meta Box Shipment Supplier Roles In

 

includes/class-wc-product-serialnumber-ajax.php
apply_filters( 'woocommerce_product_serialnumber_save_product_serialnumber_ajax_parent', $parent_id, $product_serialnumber, $order_item_id); Product Serialnumber Save Product Serialnumber Ajax Parent
apply_filters( 'woocommerce_json_search_found_items', $found_items ); JSON Search Found Items

 

includes/class-wc-product-serialnumber-product-serialnumber.php
apply_filters( 'woocommerce_product_serialnumber_new_note_data', compact( 'comment_post_ID', 'comment_author', 'comment_author_email',

‘comment_author_url’, ‘comment_content’, ‘comment_agent’, ‘comment_type’, ‘comment_parent’, ‘comment_approved’ ), $this->id );

Product Serialnumber New Note Data

 

includes/class-wc-product-serialnumber-shipment.php
apply_filters( 'woocommerce_product_serialnumber_new_note_data', compact( 'comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_agent', 'comment_type', 'comment_parent', 'comment_approved' ), $this->id ); Product Serialnumber New Note Data

 

includes/wc-product-serialnumber-functions.php
apply_filters( 'wc_product_serialnumber_statuses', $product_serialnumber_statuses ); Product Serialnumber Statuses
apply_filters( 'wc_product_serialnumber_default_supplier_id', $supplier_id ); Product Serialnumber Default Supplier ID