Skip to content

Commit

Permalink
Fixed activator - removed attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Hathoriel committed Nov 8, 2021
1 parent e296bcf commit edf3ddb
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 44 deletions.
22 changes: 0 additions & 22 deletions inc/Activator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Hathoriel\Tatum;

use Hathoriel\Tatum\base\UtilsProvider;
use Hathoriel\Tatum\tatum\Chains;
use Hathoriel\Utils\Activator as UtilsActivator;

// @codeCoverageIgnoreStart
Expand All @@ -24,7 +23,6 @@ class Activator
*/
public function activate() {
$this->initDatabase();
$this->initAttributes();
}

/**
Expand Down Expand Up @@ -84,24 +82,4 @@ private function initDatabase() {
) $charset_collate;";
dbDelta($sql);
}

private function initAttributes() {
$attributes = wc_get_attribute_taxonomies();
$slugs = wp_list_pluck($attributes, 'attribute_name');

if (!in_array('tatum_nft_chain', $slugs)) {
$args = array(
'slug' => 'tatum_nft_chain',
'name' => __('Tatum NFT chain', 'tatum-nft-chain'),
'type' => 'select',
'orderby' => 'menu_order',
'has_archives' => false,
);

wc_create_attribute($args);
}
foreach (Chains::getChainCodes() as $chain) {
wp_insert_term($chain, 'pa_tatum_nft_chain');
}
}
}
2 changes: 1 addition & 1 deletion inc/base/others/cachebuster-lib.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
/* This file was automatically generated by the `grunt libs:cachebuster` command (Mon Nov 08 2021 13:06:49 GMT+0100 (Central European Standard Time)). */
/* This file was automatically generated by the `grunt libs:cachebuster` command (Mon Nov 08 2021 20:53:19 GMT+0100 (Central European Standard Time)). */
return array(
'mobx' => '4.15.4',
'react' => '17.0.2',
Expand Down
2 changes: 1 addition & 1 deletion inc/base/others/cachebuster.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
/* This file was automatically generated by the `grunt libs:cachebuster` command (Mon Nov 08 2021 13:06:49 GMT+0100 (Central European Standard Time)). */
/* This file was automatically generated by the `grunt libs:cachebuster` command (Mon Nov 08 2021 20:53:19 GMT+0100 (Central European Standard Time)). */
return array(
'src/public/dist/admin.js' => '91676d9e5af4f8ad7beeb660744b8c3f',
'src/public/dist/vendor-admin.js' => '3a0de1fe5709d597975e4e6993e9600a',
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitbc9245c7367635177adeb6c724fb8765::getLoader();
return ComposerAutoloaderInitca38ed42bb78fd96011107c159caeffe::getLoader();
8 changes: 4 additions & 4 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInitbc9245c7367635177adeb6c724fb8765
class ComposerAutoloaderInitca38ed42bb78fd96011107c159caeffe
{
private static $loader;

Expand All @@ -24,15 +24,15 @@ public static function getLoader()

require __DIR__ . '/platform_check.php';

spl_autoload_register(array('ComposerAutoloaderInitbc9245c7367635177adeb6c724fb8765', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitca38ed42bb78fd96011107c159caeffe', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInitbc9245c7367635177adeb6c724fb8765', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitca38ed42bb78fd96011107c159caeffe', 'loadClassLoader'));

$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';

call_user_func(\Composer\Autoload\ComposerStaticInitbc9245c7367635177adeb6c724fb8765::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitca38ed42bb78fd96011107c159caeffe::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInitbc9245c7367635177adeb6c724fb8765
class ComposerStaticInitca38ed42bb78fd96011107c159caeffe
{
public static $prefixLengthsPsr4 = array (
'k' =>
Expand Down Expand Up @@ -70,9 +70,9 @@ class ComposerStaticInitbc9245c7367635177adeb6c724fb8765
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitbc9245c7367635177adeb6c724fb8765::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitbc9245c7367635177adeb6c724fb8765::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitbc9245c7367635177adeb6c724fb8765::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitca38ed42bb78fd96011107c159caeffe::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitca38ed42bb78fd96011107c159caeffe::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitca38ed42bb78fd96011107c159caeffe::$classMap;

}, null, ClassLoader::class);
}
Expand Down
4 changes: 2 additions & 2 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '8417cf14590df3807af3451d2b1836b260fb20aa',
'reference' => '203695e76cf3e3d0ea1e072df8bc57b9a75424fb',
'name' => '__root__',
'dev' => false,
),
Expand All @@ -16,7 +16,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '8417cf14590df3807af3451d2b1836b260fb20aa',
'reference' => '203695e76cf3e3d0ea1e072df8bc57b9a75424fb',
'dev_requirement' => false,
),
'kornrunner/keccak' => array(
Expand Down
2 changes: 1 addition & 1 deletion vendor/tatum/utils/vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit3f87c0a9b23a908eb7133eee8294e0a3::getLoader();
return ComposerAutoloaderInitf7361bbe595adda61517a2c8a420c030::getLoader();
8 changes: 4 additions & 4 deletions vendor/tatum/utils/vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit3f87c0a9b23a908eb7133eee8294e0a3
class ComposerAutoloaderInitf7361bbe595adda61517a2c8a420c030
{
private static $loader;

Expand All @@ -22,15 +22,15 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInit3f87c0a9b23a908eb7133eee8294e0a3', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitf7361bbe595adda61517a2c8a420c030', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit3f87c0a9b23a908eb7133eee8294e0a3', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitf7361bbe595adda61517a2c8a420c030', 'loadClassLoader'));

$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';

call_user_func(\Composer\Autoload\ComposerStaticInit3f87c0a9b23a908eb7133eee8294e0a3::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitf7361bbe595adda61517a2c8a420c030::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
Expand Down
8 changes: 4 additions & 4 deletions vendor/tatum/utils/vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInit3f87c0a9b23a908eb7133eee8294e0a3
class ComposerStaticInitf7361bbe595adda61517a2c8a420c030
{
public static $prefixLengthsPsr4 = array (
'H' =>
Expand Down Expand Up @@ -35,9 +35,9 @@ class ComposerStaticInit3f87c0a9b23a908eb7133eee8294e0a3
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit3f87c0a9b23a908eb7133eee8294e0a3::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit3f87c0a9b23a908eb7133eee8294e0a3::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit3f87c0a9b23a908eb7133eee8294e0a3::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitf7361bbe595adda61517a2c8a420c030::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitf7361bbe595adda61517a2c8a420c030::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitf7361bbe595adda61517a2c8a420c030::$classMap;

}, null, ClassLoader::class);
}
Expand Down

0 comments on commit edf3ddb

Please sign in to comment.