PluginProbe
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More / 2.0.0
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More v2.0.0
2.3.0 2.2.0 2.1.1 2.1.0 2.0.0 1.10.0 1.9.1 1.9.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 All 59 releases
storeengine / includes / database / create-tax-rates.php

create-tax-rates.php in StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More 2.0.0, at includes/database/create-tax-rates.php

34 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace StoreEngine\Database;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit;
7 }
8
9 class CreateTaxRates {
10
11 public static function up( $prefix, $charset_collate ) {
12 $table_name = $prefix . 'storeengine_tax_rates';
13 $sql = "CREATE TABLE IF NOT EXISTS {$table_name} (
14 `tax_rate_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
15 `tax_rate_country` varchar(2) NOT NULL DEFAULT '',
16 `tax_rate_state` varchar(200) NOT NULL DEFAULT '',
17 `tax_rate` varchar(8) NOT NULL DEFAULT '',
18 `tax_rate_name` varchar(200) NOT NULL DEFAULT '',
19 `tax_rate_priority` bigint(20) unsigned NOT NULL,
20 `tax_rate_compound` int(1) NOT NULL DEFAULT '0',
21 `tax_rate_shipping` int(1) NOT NULL DEFAULT '1',
22 `tax_rate_order` bigint(20) unsigned NOT NULL,
23 `tax_rate_class` varchar(200) NOT NULL DEFAULT '',
24 PRIMARY KEY (`tax_rate_id`),
25 KEY `tax_rate_country` (`tax_rate_country`),
26 KEY `tax_rate_state` (`tax_rate_state`(2)),
27 KEY `tax_rate_class` (`tax_rate_class`(10)),
28 KEY `tax_rate_priority` (`tax_rate_priority`)
29 ) $charset_collate;";
30
31 dbDelta( $sql );
32 }
33 }
34