assets
5 years ago
admin-product.php
5 years ago
attribute-hooks.php
5 years ago
frontend.php
5 years ago
helper.php
5 years ago
swatches.php
5 years ago
helper.php
27 lines
| 1 | <?php |
| 2 | |
| 3 | namespace ShopEngine\Modules\Swatches; |
| 4 | |
| 5 | defined('ABSPATH') || exit; |
| 6 | |
| 7 | |
| 8 | class Helper |
| 9 | { |
| 10 | |
| 11 | public static function get_tax_attribute($taxonomy) { |
| 12 | |
| 13 | global $wpdb; |
| 14 | |
| 15 | $attr = substr($taxonomy, 3); |
| 16 | $attr = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies WHERE attribute_name = %s", $attr)); |
| 17 | |
| 18 | return $attr; |
| 19 | } |
| 20 | |
| 21 | |
| 22 | public static function get_dummy() { |
| 23 | |
| 24 | return WC()->plugin_url() . '/assets/images/placeholder.png'; |
| 25 | } |
| 26 | } |
| 27 |