| 1 |
<?php |
| 2 |
|
| 3 |
namespace Templately\Builder\Conditions; |
| 4 |
|
| 5 |
class ProductSearch extends Search { |
| 6 |
public function get_priority(): int { |
| 7 |
return 40; |
| 8 |
} |
| 9 |
|
| 10 |
public function get_label(): string { |
| 11 |
return __( 'Product Search', 'templately' ); |
| 12 |
} |
| 13 |
|
| 14 |
public function get_name(): string { |
| 15 |
return 'product_search'; |
| 16 |
} |
| 17 |
|
| 18 |
public function check( $args = [] ): bool { |
| 19 |
return is_search() && 'product' === get_query_var( 'post_type' ); |
| 20 |
} |
| 21 |
} |