افزونه حمل و نقل ووکامرس icon
Utilities

افزونه حمل و نقل ووکامرس hooks reference

  • By Mahdi Yousefi [MahdiY]
  • v4.4.9
  • Updated

افزونه حمل و نقل ووکامرس 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.

functions.phpyour child theme
// 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

    filter
    includes/class-pws.php line 773 · used in 2 places
    apply_filters( 'pws_cities', $cities, $state_id );
  • includes/class-ajax.php line 31 · used in 2 places
    apply_filters( 'pws_default_city', 0, $type, $state_id );
  • includes/class-ajax.php line 76 · used in 2 places
    apply_filters( 'pws_default_district', $city_id, $type, $city_id );
  • includes/class-pws.php line 310 · used in 2 places
    apply_filters( 'pws_default_state', 0, $type );
  • pws_districts

    filter
    includes/class-ajax.php line 69 · used in 2 places
    apply_filters( 'pws_districts', $cities, $city_id );
  • includes/class-status.php line 646 · used in 2 places
    do_action( 'pws_save_order_post_barcode', $order, $response->entries->barcode );
  • includes/admin/class-city.php line 101 · used in 2 places
    do_action( 'pws_state_city_updated' );
  • pws_states

    filter
    includes/class-pws.php line 742 · used in 2 places
    apply_filters( 'pws_states', $states );
  • pws_add_rate

    filter
    methods/pws-method.php line 228
    apply_filters( 'pws_add_rate', [ 'id' => $this->get_rate_id(), 'label' => $label, 'cost' => $cost, 'meta_data' => $meta_data, ], $package, $this );
  • includes/class-cart.php line 33
    apply_filters( 'pws_cart_weight', $weight );
  • includes/class-pws.php line 324
    apply_filters( 'pws_city_class', $class );
  • includes/class-pws.php line 326
    apply_filters( 'pws_city_priority', $fields[ $type ][ $type . '_city' ]['priority'] );
  • includes/class-pws.php line 336
    apply_filters( 'pws_district_class', $class );
  • includes/class-pws.php line 339
    apply_filters( 'pws_district_priority', $fields[ $type ][ $type . '_city' ]['priority'] + 1 );
  • includes/class-status.php line 100
    apply_filters( 'pws_get_order_statuses', $statuses );
  • methods/pws-method.php line 202
    apply_filters( 'pws_has_free_shipping', $has_free_shipping, $package, $this );
  • maps/class-map-service.php line 89
    apply_filters( 'pws_map_checkout_placement', PWS()->get_option( 'map.checkout_placement', 'none' ) );
  • maps/class-map-service.php line 99
    apply_filters( 'pws_map_enabled_shipping_methods', PWS()->get_option( 'map.shipping_methods', [ 'all_shipping_methods' ] ) );
  • maps/class-map-service.php line 110
    apply_filters( 'pws_map_required_location', $is_location_required );
  • maps/class-map-service.php line 247
    apply_filters( 'pws_map_store_draw_line_color', '#00FF00' );
  • maps/class-map-service.php line 246
    apply_filters( 'pws_map_store_marker_color', '#6678FF' );
  • maps/class-map-service.php line 245
    apply_filters( 'pws_map_store_marker_image', PWS_URL . 'assets/images/store-marker.png' );
  • maps/class-map-service.php line 251
    apply_filters( 'pws_map_user_marker_color', '#FF8330' );
  • maps/class-map-service.php line 250
    apply_filters( 'pws_map_user_marker_image', PWS_URL . 'assets/images/map-marker.png' );
  • includes/admin/class-admin.php line 26
    apply_filters( 'pws_menu_capability', 'manage_woocommerce' );
  • methods/pws-method.php line 125
    apply_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... );
  • includes/class-order.php line 34
    apply_filters( 'pws_order_weight', $weight, $order );
  • includes/class-product.php line 22
    apply_filters( 'pws_product_weight', $weight, $product );
  • includes/admin/class-settings.php line 563
    do_action( 'pws_settings_bottom_form' );
  • includes/admin/class-tools.php line 44
    apply_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... );
  • includes/admin/class-tools.php line 22
    apply_filters( 'pws_settings_sections', [ [ 'id' => 'pws_tools', 'title' => 'ابزارهای کاربردی', ], [ 'id' => 'pws_map', 'title' => 'نقشه', ], ] );
  • includes/admin/class-settings.php line 542
    do_action( 'pws_settings_top_form' );
  • pws_sms_tags

    filter
    includes/class-sms.php line 148
    apply_filters( 'pws_sms_tags', $tags, $order, $data );
  • pws_submenu

    filter
    includes/admin/class-admin.php line 75
    apply_filters( 'pws_submenu', $submenus );
  • methods/tapin-method.php line 172
    apply_filters( 'pws_tapin_calculate_rates_args', $args, $package, $this );
  • includes/class-tools.php line 33
    apply_filters( 'pws_tapin_can_show_credit', current_user_can( 'manage_woocommerce' ) );
  • includes/class-status.php line 750
    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', ], ], ] );
  • includes/class-ajax.php line 46
    apply_filters( 'pws_tapin_load_districts', '' );
  • includes/class-status.php line 484
    do_action( 'pws_tapin_pre_submit_order', $order );
  • includes/class-status.php line 557
    apply_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... );
  • methods/pws-method.php line 196
    apply_filters( "woocommerce_shipping_{$this->id}_is_available", $available, $package, $this );
  • methods/pws-method.php line 194
    apply_filters( 'woocommerce_shipping_pws_methods_is_available', $available, $package, $this );
  • includes/admin/class-settings.php line 553
    do_action( "wsa_form_bottom_{$form['id']}", $form );
  • includes/admin/class-settings.php line 550
    do_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: