Title: Search Attributes for WooCommerce
Author: Aslam Doctor
Published: <strong>2 Tháng 3, 2021</strong>
Last modified: 17 Tháng 10, 2026

---

Tìm kiếm plugin

![](https://ps.w.org/search-attributes-for-woocommerce/assets/banner-772x250.jpg?
rev=2716606)

![](https://ps.w.org/search-attributes-for-woocommerce/assets/icon-256x256.jpg?rev
=2716606)

# Search Attributes for WooCommerce

 Bởi [Aslam Doctor](https://profiles.wordpress.org/aslamdoctor/)

[Tải về](https://downloads.wordpress.org/plugin/search-attributes-for-woocommerce.1.3.7.zip)

 * [Chi tiết](https://vi.wordpress.org/plugins/search-attributes-for-woocommerce/#description)
 * [Đánh giá](https://vi.wordpress.org/plugins/search-attributes-for-woocommerce/#reviews)
 *  [Cài đặt](https://vi.wordpress.org/plugins/search-attributes-for-woocommerce/#installation)
 * [Nhà phát triển](https://vi.wordpress.org/plugins/search-attributes-for-woocommerce/#developers)

 [Hỗ trợ](https://wordpress.org/support/plugin/search-attributes-for-woocommerce/)

## Mô tả

Search Attributes for WooCommerce is a WordPress Plugin that enables Product search
form to look into Product Attribute Names.
 E.g. as show in plugin screenshots, 
you can search products using color name. Another useful example is, you can search
products using Brand name if you have Brands assigned as attributes.

To use this plugin, please make sure that Woocommerce is installed and Activated.

### Important Notes

 1. The plugin may not effect in case you are using some other product search related
    plugin for woocommerce.
 2. Choose your attributes carefully, because the more attributes you choose, the more
    it will effect on the search speed.

### Contribute

If you want to fix a bug in the plugin or add new features, feel free to fork this
[github repo](https://github.com/aslamdoctor/search-attributes-for-woocommerce) 
and follow the `CONTRIBUTING.md` file in the github repo for guidelines.

## Ảnh màn hình

[⌊Search result for color "red" before activating plugin⌉⌊Search result for color"
red" before activating plugin⌉[

Search result for color “red” before activating plugin

[⌊Enable plugin for "Color" attribute⌉⌊Enable plugin for "Color" attribute⌉[

Enable plugin for “Color” attribute

[⌊Search result for color "red" after activating plugin⌉⌊Search result for color"
red" after activating plugin⌉[

Search result for color “red” after activating plugin

## Cài đặt

 1. Go to your admin area and select Plugins -> Add new from the menu.
 2. Search for “Search Attributes for WooCommerce”.
 3. Click install.
 4. Click activate. If woocommrce is not installed or activated then this plugin will
    also not activate.

## Hỏi đáp

### How do I use this plugin?

 1. Go to WordPress “Admin > Woocommerce > Search Attributes for WooCommerce”.
 2. Select the attributes you want the search form to look into, select status to “
    Enable” and click “Save Changes”.

### Can I undo the changes I have made after deactivating or deleting the plugin?

Yes. if you disable or delete the plugin, the changes you made will be undone. Also
if you change the Status in plugin settings to “Disabled”, it will not search for
attributes.

## Đánh giá

![](https://secure.gravatar.com/avatar/c7422c4b91646ddfa3d9fab9e49ba5fe98aca557c6962eb01739195d2356047b?
s=60&d=retro&r=g)

### 󠀁[Absolutely stunning!](https://wordpress.org/support/topic/absolutely-stunning-17/)󠁿

 [rozlity](https://profiles.wordpress.org/rozlity/) 5 Tháng 9, 2025

Exactly what I was looking for! I needed a plugin that could search for book authors(
who are listed as attributes). I highly recommend it to everyone and thank you!

![](https://secure.gravatar.com/avatar/9a7bba7b2ad2f140675d560625112a183ecf0020f84eed5ac61262d6f2878042?
s=60&d=retro&r=g)

### 󠀁[Good Job!](https://wordpress.org/support/topic/good-job-1789/)󠁿

 [denizutku](https://profiles.wordpress.org/denizutku/) 23 Tháng 3, 2024

Its Cool…

![](https://secure.gravatar.com/avatar/8c1a12e986ecd0212639b81cb0a6813585341784ac887847f1bfa83763ac647f?
s=60&d=retro&r=g)

### 󠀁[Search on hidden attributes](https://wordpress.org/support/topic/search-on-hidden-attributes/)󠁿

 [tanduf](https://profiles.wordpress.org/tanduf/) 26 Tháng 11, 2023 1 trả lời

Great plugin ! Very easy to configure and use. Allows searching on hidden attributes
of products. Exactly what i was looking for. Long life to this plugin.

![](https://secure.gravatar.com/avatar/92580f9631064d41668ea1251fea13de9dedaf552c0145b04fc685c07010fdac?
s=60&d=retro&r=g)

### 󠀁[does the job](https://wordpress.org/support/topic/does-the-job-944/)󠁿

 [linascp](https://profiles.wordpress.org/linascp/) 4 Tháng 1, 2023

Very good, does the job.

![](https://secure.gravatar.com/avatar/f817d15460d98d210b28701488b7104475ea7a6f27ea782e377cedce865b083e?
s=60&d=retro&r=g)

### 󠀁[Problem with translation](https://wordpress.org/support/topic/problem-with-translation-57/)󠁿

 [Danny](https://profiles.wordpress.org/daining1298/) 1 Tháng 7, 2022

I use PolyLang for translation. With this plugin, search result shows product with
all different languages.

![](https://secure.gravatar.com/avatar/fba5ea767543dcfac1cf52ef38148df6f5a449e4d32546b2936dc8ecd68105d8?
s=60&d=retro&r=g)

### 󠀁[Simple and effective (Mod: Exclude products where the variation is out of stock)](https://wordpress.org/support/topic/simple-and-effective-mod-exclude-products-where-the-variation-is-out-of-stock/)󠁿

 [sajetek](https://profiles.wordpress.org/sajetek/) 1 Tháng 1, 2022

Great and straightforward plugin. It does what I needed mostly so I just modified
it a bit to exclude products where variation of the searched attribute is out of
stock. e.g. If I search for Medium in a shirt, the product must NOT show if medium
of that product is out of stock. function wsatt_brands_where( $where = '' ) { global
$wpdb; $product_ids = get_in_stock_IDS(); if($product_ids != "") $where .= " OR 
$wpdb->posts.ID IN (".get_in_stock_IDS().")"; return $where; } function get_in_stock_IDS(){
global $wpdb; $parent_ids = array(); $wsatt_attributes = @get_option('wsatt_attributes');
if(is_array($wsatt_attributes) && count($wsatt_attributes)>0){ foreach($wsatt_attributes
as $attribute){ $parent_id_objects = $wpdb->get_results("SELECT $wpdb->posts.ID 
FROM $wpdb->posts LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb-
>term_relationships.object_id) LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.
term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) LEFT JOIN $wpdb->terms
ON($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id) WHERE $wpdb->posts.post_type
= 'product' AND $wpdb->posts.post_status = 'publish' AND $wpdb->term_taxonomy.taxonomy
= '$attribute' AND $wpdb->terms.name LIKE '%".esc_attr( $_GET['s'] )."%'"); if(count(
$parent_id_objects) == 0) continue; foreach($parent_id_objects as $parent_id_object){
$children = get_option("_transient_wc_product_children_".$parent_id_object->ID);
if(is_array($children) && count($children['all']) > 0) { $instock = $wpdb->get_var("
SELECT s.meta_value as stock from $wpdb->postmeta LEFT JOIN $wpdb->postmeta as s
ON s.post_id = $wpdb->postmeta.post_id AND s.meta_key = '_stock' WHERE $wpdb->postmeta.
post_id IN (".implode(",", $children['all']).") AND $wpdb->postmeta.meta_key like'%".
$attribute."' AND $wpdb->postmeta.meta_value LIKE '%".esc_attr( $_GET['s'] )."%'
AND s.meta_value > 0"); if($instock != NULL) { //Child is matched based on query
string and stock is NOT zero so we add that parent id to be displayed $parent_ids[]
= $parent_id_object->ID; } }else { $parent_ids[] = $parent_id_object->ID; } } } 
return implode(",", $parent_ids); } }

 [ Đọc tất cả 9 đánh giá ](https://wordpress.org/support/plugin/search-attributes-for-woocommerce/reviews/)

## Người đóng góp & Lập trình viên

“Search Attributes for WooCommerce” là mã nguồn mở. Những người sau đã đóng góp 
vào plugin này.

Những người đóng góp

 *   [ Aslam Doctor ](https://profiles.wordpress.org/aslamdoctor/)

[Dịch “Search Attributes for WooCommerce” sang ngôn ngữ của bạn.](https://translate.wordpress.org/projects/wp-plugins/search-attributes-for-woocommerce)

### Muốn tham gia phát triển?

[Duyệt code](https://plugins.trac.wordpress.org/browser/search-attributes-for-woocommerce/),
check out [SVN repository](https://plugins.svn.wordpress.org/search-attributes-for-woocommerce/),
hoặc theo dõi [nhật ký phát triển](https://plugins.trac.wordpress.org/log/search-attributes-for-woocommerce/)
qua [RSS](https://plugins.trac.wordpress.org/log/search-attributes-for-woocommerce/?limit=100&mode=stop_on_copy&format=rss).

## Nhật ký thay đổi

#### Version 1.3.7

 * Tested with WordPress version 7.1
 * Tested with WooCommerce version 11.2.1
 * Consolidated product attribute search into a single prepared SQL query
 * Added sanitize callbacks for plugin settings
 * Fixed admin notice echo syntax
 * Added option cleanup on plugin uninstall
 * Updated core attribute taxonomy retrieval to use wc_get_attribute_taxonomies

#### Version 1.3.6

 * tested with wordpress version 6.8
 * tested with woocommerce version 9.8.2

#### Version 1.3.5

 * tested with wordpress version 6.7.1
 * tested with woocommerce version 9.5.2

#### Version 1.3.4

 * Make plugin compatible with HPOS ( High-Performance Order Storage )
 * tested with wordpress version 6.4.0
 * tested with woocommerce version 8.4.0

#### Version 1.3.3

 * tested with wordpress version 6.1.1
 * tested with woocommerce version 7.2.0

#### Version 1.3.2

 * tested with wordpress version 5.9.3
 * tested with woocommerce version 6.4.1
 * added notes for developers for contributing to plugin

#### Version 1.3.0

 * added global translation support

#### Version 1.2.0

 * Secutiry fixes
 * Refactoring of the code
 * Updated the code to follow WPVIP coding standards

#### Version 1.0.0

 * Initial release.

## Meta

 *  Phiên bản **1.3.7**
 *  Cập nhật lần cuối **4 tuần trước**
 *  Số lượt cài đặt **600+**
 *  Phiên bản WordPress ** 6.6 hoặc cao hơn **
 *  Đã kiểm tra lên đến **7.1.4**
 *  Phiên bản PHP ** 7.4.0 hoặc cao hơn **
 *  Ngôn ngữ
 * [English (US)](https://wordpress.org/plugins/search-attributes-for-woocommerce/)
 * Thẻ
 * [attribute](https://vi.wordpress.org/plugins/tags/attribute/)[ecommerce](https://vi.wordpress.org/plugins/tags/ecommerce/)
   [product](https://vi.wordpress.org/plugins/tags/product/)[search](https://vi.wordpress.org/plugins/tags/search/)
   [woocommerce](https://vi.wordpress.org/plugins/tags/woocommerce/)
 *  [Nâng cao](https://vi.wordpress.org/plugins/search-attributes-for-woocommerce/advanced/)

## Đánh giá

 4.9 trên 5 sao.

 *  [  8 5-star reviews     ](https://wordpress.org/support/plugin/search-attributes-for-woocommerce/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/search-attributes-for-woocommerce/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/search-attributes-for-woocommerce/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/search-attributes-for-woocommerce/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/search-attributes-for-woocommerce/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/search-attributes-for-woocommerce/reviews/#new-post)

[Xem tất cả đánh giá](https://wordpress.org/support/plugin/search-attributes-for-woocommerce/reviews/)

## Những người đóng góp

 *   [ Aslam Doctor ](https://profiles.wordpress.org/aslamdoctor/)

## Hỗ trợ

Các lỗi đã xử lý trong vòng hai tháng gần đây:

     0 trên 1

 [Xem diễn đàn hỗ trợ](https://wordpress.org/support/plugin/search-attributes-for-woocommerce/)

## Ủng hộ

Bạn có muốn hỗ trợ vào sự phát triển của plugin này?

 [ Ủng hộ plugin này ](https://github.com/sponsors/aslamdoctor)