/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
DROP TABLE IF EXISTS `wplc_snippets`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `wplc_snippets` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` tinytext COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `code` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `tags` longtext COLLATE utf8mb4_unicode_520_ci NOT NULL,
  `scope` varchar(15) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'global',
  `priority` smallint(6) NOT NULL DEFAULT '10',
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `revision` bigint(20) NOT NULL DEFAULT '1',
  `cloud_id` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `scope` (`scope`),
  KEY `active` (`active`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

INSERT INTO `wplc_snippets` VALUES (1,'Example HTML shortcode','This is an example snippet for demonstrating how to add an HTML shortcode.\n\nYou can remove it, or edit it to add your own content.','\nadd_shortcode( \'shortcode_name\', function () {\n\n	$out = \'<p>write your HTML shortcode content here</p>\';\n\n	return $out;\n} );','shortcode','global',10,0,'2022-02-15 22:04:47',1,NULL);
INSERT INTO `wplc_snippets` VALUES (2,'Example CSS snippet','This is an example snippet for demonstrating how to add custom CSS code to your website.\n\nYou can remove it, or edit it to add your own content.','\nadd_action( \'wp_head\', function () { ?>\n<style>\n\n	/* write your CSS code here */\n\n</style>\n<?php } );\n','css','front-end',10,0,'2022-02-15 22:04:47',1,NULL);
INSERT INTO `wplc_snippets` VALUES (3,'Example JavaScript snippet','This is an example snippet for demonstrating how to add custom JavaScript code to your website.\n\nYou can remove it, or edit it to add your own content.','\nadd_action( \'wp_head\', function () { ?>\n<script>\n\n	/* write your JavaScript code here */\n\n</script>\n<?php } );\n','javascript','front-end',10,0,'2022-02-15 22:04:47',1,NULL);
INSERT INTO `wplc_snippets` VALUES (4,'Order snippets by name','Order snippets by name by default in the snippets table.','\nadd_filter( \'code_snippets/list_table/default_orderby\', function () {\n	return \'name\';\n} );\n','code-snippets-plugin','admin',10,0,'2022-02-15 22:04:47',1,NULL);
INSERT INTO `wplc_snippets` VALUES (5,'Order snippets by date','Order snippets by last modification date by default in the snippets table.','\nadd_filter( \'code_snippets/list_table/default_orderby\', function () {\n	return \'modified\';\n} );\n\nadd_filter( \'code_snippets/list_table/default_order\', function () {\n	return \'desc\';\n} );\n','code-snippets-plugin','admin',10,0,'2022-02-15 22:04:47',1,NULL);
INSERT INTO `wplc_snippets` VALUES (6,'Set Minimum Order Amount (WooCommerce Override) - $50.00','<p>Sets a minimum order amount for WooCommerce.</p>','/**\n * Set a minimum order amount for checkout\n */\nadd_action( \'woocommerce_checkout_process\', \'wc_minimum_order_amount\' );\nadd_action( \'woocommerce_before_cart\' , \'wc_minimum_order_amount\' );\n \nfunction wc_minimum_order_amount() {\n    // Set this variable to specify a minimum order value\n    $minimum = 50;\n\n    if ( WC()->cart->total < $minimum ) {\n\n        if( is_cart() ) {\n\n            wc_print_notice( \n                sprintf( \'Your current order total is %s — you must have an order with a minimum of %s to place your order \' , \n                    wc_price( WC()->cart->total ), \n                    wc_price( $minimum )\n                ), \'error\' \n            );\n\n        } else {\n\n            wc_add_notice( \n                sprintf( \'Your current order total is %s — you must have an order with a minimum of %s to place your order\' , \n                    wc_price( WC()->cart->total ), \n                    wc_price( $minimum )\n                ), \'error\' \n            );\n\n        }\n    }\n}','','global',10,0,'2023-06-13 20:39:24',1,NULL);

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

