LookupFilters.php
1 week ago
LookupFiltersFactory.php
1 week ago
LookupTable.php
1 week ago
LookupTableFactory.php
1 week ago
LookupFiltersFactory.php
22 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WCML\Attributes; |
| 4 | |
| 5 | class LookupFiltersFactory implements \IWPML_Frontend_Action_Loader { |
| 6 | |
| 7 | public function create() { |
| 8 | global $sitepress, $wpdb; |
| 9 | |
| 10 | if ( self::isEnabled() ) { |
| 11 | return new LookupFilters( $sitepress, $wpdb ); |
| 12 | } |
| 13 | |
| 14 | return null; |
| 15 | } |
| 16 | |
| 17 | public static function isEnabled() { |
| 18 | return 'yes' === get_option( 'woocommerce_attribute_lookup_enabled' ); |
| 19 | } |
| 20 | |
| 21 | } |
| 22 |