This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| # Fill our vars and run on cli | |
| # $ php -f db-connect-test.php | |
| $dbname = 'name'; | |
| $dbuser = 'user'; | |
| $dbpass = 'pass'; | |
| $dbhost = 'host'; | |
| $link = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * | |
| * In this example we create view with inplace and bulk editing. | |
| * Tools and plugins: | |
| * jQuery | |
| * xEditable jquery plugin | |
| * twitter bootstrap | |
| * | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require __DIR__ . '/vendor/autoload.php'; | |
| use Automattic\WooCommerce\Client; | |
| use Automattic\WooCommerce\HttpClient\HttpClientException; | |
| function getWoocommerceConfig() | |
| { | |
| $woocommerce = new Client( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Delete all logs | |
| TRUNCATE ps_log; | |
| # Delete old connection data (only used for stats) | |
| # change 2016-02-01 00:00:00 according to you needs | |
| DELETE c, cs | |
| FROM ps_connections c | |
| LEFT JOIN ps_connections_source cs ON (c.id_connections = cs.id_connections) | |
| WHERE c.date_add < '2016-02-01 00:00:00'; |