🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-07 01:41:19 | PHP 8.2.32
📂
/ (Root)
/
home
/
eliteewa
/
public_html
/
wp-content
/
themes
/
blocksy
/
inc
/
classes
/
db-versioning
📍 /home/eliteewa/public_html/wp-content/themes/blocksy/inc/classes/db-versioning
🔄 Refresh
✏️
Editing: v2-0-36.php
Writable
<?php namespace Blocksy\DbVersioning; class V2036 { public function migrate() { if ( ! function_exists('wc_get_attribute_taxonomies') || ! class_exists('\Blocksy\Plugin') || ! in_array( 'woocommerce-extra', get_option('blocksy_active_extensions', []) ) ) { return; } $settings = get_option('blocksy_ext_woocommerce_extra_settings', []); if (! is_array($settings)) { return; } if ( ! isset($settings['features']['variation-swatches']) || ! $settings['features']['variation-swatches'] ) { return; } foreach (array_values(wc_get_attribute_taxonomies()) as $tax) { $taxonomy = (array) $tax; $new_type = 'button'; $meta = blocksy_get_taxonomy_options($taxonomy['attribute_id']); if ( $meta && isset($meta['swatch_type']) ) { $new_type = $meta['swatch_type']; } if ($taxonomy['attribute_type'] !== $new_type) { wc_update_attribute( $taxonomy['attribute_id'], [ 'name' => $taxonomy['attribute_label'], 'slug' => $taxonomy['attribute_name'], 'type' => $new_type, 'order_by' => $taxonomy['attribute_orderby'], 'has_archives' => $taxonomy['attribute_public'] ] ); } } } }
💾 Save Changes
❌ Cancel