افزونه حمل و نقل ووکامرس 4.4.9 has 7 actions and 37 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when افزونه حمل و نقل ووکامرس fires an action
add_action( 'pws_save_order_post_barcode', function( $order, $barcode ) {
// Your code runs here.
}, 10, 2 );
// Change a value افزونه حمل و نقل ووکامرس is about to use
add_filter( 'pws_cities', function( $cities, $state_id ) {
// Change $cities here.
return $cities;
}, 10, 2 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
pws_cities
filterapply_filters( 'pws_cities', $cities, $state_id ); -
pws_default_city
filterapply_filters( 'pws_default_city', 0, $type, $state_id ); -
pws_default_district
filterapply_filters( 'pws_default_district', $city_id, $type, $city_id ); -
pws_default_state
filterapply_filters( 'pws_default_state', 0, $type ); -
pws_districts
filterapply_filters( 'pws_districts', $cities, $city_id ); -
pws_save_order_post_barcode
actiondo_action( 'pws_save_order_post_barcode', $order, $response->entries->barcode ); -
pws_state_city_updated
actiondo_action( 'pws_state_city_updated' ); -
pws_states
filterapply_filters( 'pws_states', $states ); -
pws_add_rate
filterapply_filters( 'pws_add_rate', [ 'id' => $this->get_rate_id(), 'label' => $label, 'cost' => $cost, 'meta_data' => $meta_data, ], $package, $this ); -
pws_cart_weight
filterapply_filters( 'pws_cart_weight', $weight ); -
pws_city_class
filterapply_filters( 'pws_city_class', $class ); -
pws_city_priority
filterapply_filters( 'pws_city_priority', $fields[ $type ][ $type . '_city' ]['priority'] ); -
pws_district_class
filterapply_filters( 'pws_district_class', $class ); -
pws_district_priority
filterapply_filters( 'pws_district_priority', $fields[ $type ][ $type . '_city' ]['priority'] + 1 ); -
pws_get_order_statuses
filterapply_filters( 'pws_get_order_statuses', $statuses ); -
pws_has_free_shipping
filterapply_filters( 'pws_has_free_shipping', $has_free_shipping, $package, $this ); -
pws_map_checkout_placement
filterapply_filters( 'pws_map_checkout_placement', PWS()->get_option( 'map.checkout_placement', 'none' ) ); -
apply_filters( 'pws_map_enabled_shipping_methods', PWS()->get_option( 'map.shipping_methods', [ 'all_shipping_methods' ] ) ); -
pws_map_required_location
filterapply_filters( 'pws_map_required_location', $is_location_required ); -
apply_filters( 'pws_map_store_draw_line_color', '#00FF00' ); -
pws_map_store_marker_color
filterapply_filters( 'pws_map_store_marker_color', '#6678FF' ); -
pws_map_store_marker_image
filterapply_filters( 'pws_map_store_marker_image', PWS_URL . 'assets/images/store-marker.png' ); -
pws_map_user_marker_color
filterapply_filters( 'pws_map_user_marker_color', '#FF8330' ); -
pws_map_user_marker_image
filterapply_filters( 'pws_map_user_marker_image', PWS_URL . 'assets/images/map-marker.png' ); -
pws_method_fields
filterapply_filters( 'pws_method_fields', $this->instance_form_fields + [ 'minimum_fee' => [ 'title' => 'حداقل خرید', 'type' => 'price', 'description' => 'در صورتی که مبلغ سفارش کمتر از این مبلغ باشد، این روش حمل و نقل مخفی می شود.', 'default' => 0, 'desc_tip' => true, ], 'free_fee' => [ 'title' => 'آستانه حمل و نقل رایگان', 'type' => 'price', 'descri... ); -
pws_order_weight
filterapply_filters( 'pws_order_weight', $weight, $order ); -
pws_product_weight
filterapply_filters( 'pws_product_weight', $weight, $product ); -
pws_settings_bottom_form
actiondo_action( 'pws_settings_bottom_form' ); -
pws_settings_fields
filterapply_filters( 'pws_settings_fields', [ 'pws_tools' => [ [ 'name' => 'html', 'desc' => '<b>آموزش:</b> برای پیکربندی حمل و نقل می توانید از <a href="https://l.nabik.net/pws-video" target="_blank">اینجا</a> فیلم های آموزشی افزونه را مشاهده کنید.', 'type' => 'html', ], [ 'label' => 'وضعیت سفارشات کمکی', 'name' => 'status_enable', 'default' => 1, 'typ... ); -
pws_settings_sections
filterapply_filters( 'pws_settings_sections', [ [ 'id' => 'pws_tools', 'title' => 'ابزارهای کاربردی', ], [ 'id' => 'pws_map', 'title' => 'نقشه', ], ] ); -
pws_settings_top_form
actiondo_action( 'pws_settings_top_form' ); -
pws_sms_tags
filterapply_filters( 'pws_sms_tags', $tags, $order, $data ); -
apply_filters( 'pws_tapin_calculate_rates_args', $args, $package, $this ); -
pws_tapin_can_show_credit
filterapply_filters( 'pws_tapin_can_show_credit', current_user_can( 'manage_woocommerce' ) ); -
apply_filters( 'pws_tapin_check_status_orders', [ 'type' => [ 'shop_order' ], 'status' => [ 'wc-pws-packaged', 'wc-pws-ready-to-ship', 'wc-pws-shipping', 'wc-pws-deleted', 'wc-pws-need-review', ], 'limit' => 100, 'orderby' => 'rand', 'pwsorderby' => 'rand', 'meta_query' => [ [ 'key' => 'tapin_order_uuid', ], ], ] ); -
pws_tapin_load_districts
filterapply_filters( 'pws_tapin_load_districts', '' ); -
pws_tapin_pre_submit_order
actiondo_action( 'pws_tapin_pre_submit_order', $order ); -
pws_tapin_submit_order
filterapply_filters( 'pws_tapin_submit_order', [ 'register_type' => PWS()->get_option( 'tapin.register_type', 1 ), 'shop_id' => PWS()->get_option( 'tapin.shop_id' ), 'address' => $address, 'city_code' => $city_code, 'province_code' => $province_code, 'description' => empty( $order->get_customer_note() ) ? null : $order->get_customer_note(), 'email' => null, 'employee_code' => '-1', 'first_name' => $first_name, 'last_name' => $last_name, 'mo... ); -
apply_filters( "woocommerce_shipping_{$this->id}_is_available", $available, $package, $this ); -
apply_filters( 'woocommerce_shipping_pws_methods_is_available', $available, $package, $this ); -
do_action( "wsa_form_bottom_{$form['id']}", $form ); -
wsa_form_top_{$form['id']}
actiondo_action( "wsa_form_top_{$form['id']}", $form );
Generated from افزونه حمل و نقل ووکامرس's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: