Commit Graph

195 Commits

Author SHA1 Message Date
Mike Jolley 1549158981 Add 'is_enabled' column to instances table and allow toggle in zones screen
@allendav
2016-03-15 17:23:06 +00:00
Mike Jolley 5e88adc02a Remove drop index code - will patch WP core 2016-03-12 08:18:28 +00:00
Mike Jolley 86a0fff731 [2.5] Before updating with DBDELTA, drop existing indexes so they can be re-added without duplicate key errors. 2016-03-11 12:32:43 +00:00
Justin Shreve 927941e2ca Merge pull request #10260 from justinshreve/token-api
Payment Token API
2016-03-04 04:34:41 -08:00
Mike Jolley 579365b7d5 Merge branch 'master' into 4-4-term-meta-handling
# Conflicts:
#	includes/class-wc-install.php
2016-03-02 18:38:39 +00:00
Mike Jolley b221f9964a Merge branch 'master' into 4-4-term-meta-handling 2016-03-02 18:24:52 +00:00
Mike Jolley 5c3e7ded03 Version checks not needed 2016-03-02 18:24:49 +00:00
John James Jacoby ca8ffcc9f4 Update database keys for utf8mb4 charset/collation
Since WordPress 4.2, `utf8mb4` is a natively supported and encouraged type of installation. Unfortunately some WooCommerce database tables fail to get created in these types of installations (with something like the below settings):

```
define( 'DB_CHARSET', 'utf8mb4'            );
define( 'DB_COLLATE', 'utf8mb4_unicode_ci' );
```

This commit takes a queue from WordPress core's `schema.php` and limits the length of index `KEY`s to `191`.
2016-03-01 19:28:04 -06:00
Justin Shreve cfe1da13d5 Remove todo comment for payment token tables 2016-03-01 11:49:41 -08:00
Justin Shreve f66a8b6478 Rename customer_id to user_id to match how orders reference the user. 2016-03-01 11:49:39 -08:00
Justin Shreve da9368e8be Switch the payment token meta to use WP's metadata functions. 2016-03-01 11:49:38 -08:00
Justin Shreve f9b19234b0 Fix coding/WP standard for primary key definitions - there must be two spaces between the words PRIMARY key and the definition. 2016-03-01 11:49:37 -08:00
Justin Shreve c5aec06a8a First pass at a payment token API 2016-03-01 11:49:37 -08:00
Mike Jolley e987a3830a Remove index drop for tax table 2016-02-18 10:52:54 +00:00
Mike Jolley 352184cc06 Merge branch 'master' into shipping-zones
# Conflicts:
#	assets/css/admin.css
#	i18n/languages/woocommerce.pot
#	includes/abstracts/abstract-wc-payment-gateway.php
#	includes/abstracts/abstract-wc-shipping-method.php
#	includes/admin/settings/class-wc-settings-shipping.php
#	includes/wc-core-functions.php
#	uninstall.php
2016-02-05 14:58:48 +00:00
Shiva Poudel bf2be97dd0 Use get_charset_collate of WP 2016-01-27 15:55:56 +05:45
Mike Jolley 44eac248b3 [2.5] check_version on all requests
cc @allendav Closes #10091
2016-01-19 10:05:44 +00:00
Mike Jolley 1076854608 Merge branch 'master' into shipping-zones
# Conflicts:
#	assets/css/admin.css
#	includes/abstracts/abstract-wc-shipping-method.php
#	includes/class-wc-shipping.php
#	includes/shipping/flat-rate/class-wc-shipping-flat-rate.php
#	includes/shipping/flat-rate/includes/class-wc-eval-math.php
#	includes/shipping/free-shipping/class-wc-shipping-free-shipping.php
#
includes/shipping/legacy-international-delivery/class-wc-shipping-legacy
-international-delivery.php
#
includes/shipping/legacy-local-delivery/class-wc-shipping-legacy-local-d
elivery.php
2016-01-11 11:48:18 +00:00
Mike Jolley a33b9b9750 Unit tests for shipping zones 2016-01-08 13:56:01 +00:00
Mike Jolley 76405ed220 Schema fixes 2016-01-08 13:17:13 +00:00
Fredrik Forsmo bb19615029 Improve docblock comments in various WC_* classes
* Added comments to various methods
* Fixed various properties comments and param types
2016-01-06 16:24:47 +01:00
Mike Jolley ebba366433 Delete page transient after creating pages
Closes #9962
2016-01-05 15:19:48 +00:00
Mike Jolley 97d47fb576 Move zones to main settings 2016-01-05 11:23:15 +00:00
Mike Jolley 62ca37f651 Merge branch 'master' into shipping-zones
# Conflicts:
#	includes/admin/class-wc-admin-assets.php
#	includes/class-wc-install.php
2016-01-04 14:35:45 +00:00
Mike Jolley 901db7b0f8 zone tweaks 2015-12-18 17:10:58 +00:00
Claudio Sanches c04443c2d3 Added upgrade script for #9868
cc @mikejolley
2015-12-17 08:30:06 -02:00
Mike Jolley 6cea054fca Method list screen and method screen with breadcrumbs 2015-12-11 14:11:12 +00:00
Mike Jolley 14eeb9f936 Zones first draft with backbone saving of zone names 2015-12-10 11:55:03 +00:00
Mike Jolley d64bcd70bd Only install termmeta table on older installs 2015-11-06 15:33:12 +00:00
Scrutinizer Auto-Fixer 08efaf84df Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-11-05 16:05:03 +00:00
James Collins 45972cf92b Fix duplicate key errors during db upgrade/install
Running phpunit tests currently outputs the following errors/warnings:

WordPress database error Duplicate key name 'session_id' for query ALTER TABLE wptests_woocommerce_sessions ADD UNIQUE KEY  session_id (session_id) made by PHPUnit_TextUI_Command::main, PHPUnit_TextUI_Command->run, PHPUnit_TextUI_Command->handleArguments, PHPUnit_TextUI_Command->handleBootstrap, PHPUnit_Util_Fileloader::checkAndLoad, PHPUnit_Util_Fileloader::load, include_once('/srv/www/woocommerce/htdocs/wp-content/plugins/woocommerce/tests/bootstrap.php'), WC_Unit_Tests_Bootstrap::instance, WC_Unit_Tests_Bootstrap->__construct, require_once('/srv/www/wordpress-develop/tests/phpunit/includes/bootstrap.php'), require_once('wp-settings.php'), do_action('setup_theme'), call_user_func_array, WC_Unit_Tests_Bootstrap->install_wc, WC_Install::install, WC_Install::create_tables, dbDelta
WordPress database error Multiple primary key defined for query ALTER TABLE wptests_woocommerce_sessions ADD PRIMARY KEY  session_key (session_key) made by PHPUnit_TextUI_Command::main, PHPUnit_TextUI_Command->run, PHPUnit_TextUI_Command->handleArguments, PHPUnit_TextUI_Command->handleBootstrap, PHPUnit_Util_Fileloader::checkAndLoad, PHPUnit_Util_Fileloader::load, include_once('/srv/www/woocommerce/htdocs/wp-content/plugins/woocommerce/tests/bootstrap.php'), WC_Unit_Tests_Bootstrap::instance, WC_Unit_Tests_Bootstrap->__construct, require_once('/srv/www/wordpress-develop/tests/phpunit/includes/bootstrap.php'), require_once('wp-settings.php'), do_action('setup_theme'), call_user_func_array, WC_Unit_Tests_Bootstrap->install_wc, WC_Install::install, WC_Install::create_tables, dbDelta

WordPress database error Duplicate key name 'session_id' for query ALTER TABLE wptests_woocommerce_sessions ADD UNIQUE KEY  session_id (session_id) made by PHPUnit_TextUI_Command::main, PHPUnit_TextUI_Command->run, PHPUnit_TextUI_TestRunner->doRun, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestCase->run, PHPUnit_Framework_TestResult->run, PHPUnit_Framework_TestCase->runBare, PHPUnit_Framework_TestCase->runTest, ReflectionMethod->invokeArgs, WooCommerce\Tests\Util\WC_Tests_Install->test_check_version, WC_Install::check_version, WC_Install::install, WC_Install::create_tables, dbDelta
WordPress database error Multiple primary key defined for query ALTER TABLE wptests_woocommerce_sessions ADD PRIMARY KEY  session_key (session_key) made by PHPUnit_TextUI_Command::main, PHPUnit_TextUI_Command->run, PHPUnit_TextUI_TestRunner->doRun, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestCase->run, PHPUnit_Framework_TestResult->run, PHPUnit_Framework_TestCase->runBare, PHPUnit_Framework_TestCase->runTest, ReflectionMethod->invokeArgs, WooCommerce\Tests\Util\WC_Tests_Install->test_check_version, WC_Install::check_version, WC_Install::install, WC_Install::create_tables, dbDelta
.WordPress database error Duplicate key name 'session_id' for query ALTER TABLE wptests_woocommerce_sessions ADD UNIQUE KEY  session_id (session_id) made by PHPUnit_TextUI_Command::main, PHPUnit_TextUI_Command->run, PHPUnit_TextUI_TestRunner->doRun, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestCase->run, PHPUnit_Framework_TestResult->run, PHPUnit_Framework_TestCase->runBare, PHPUnit_Framework_TestCase->runTest, ReflectionMethod->invokeArgs, WooCommerce\Tests\Util\WC_Tests_Install->test_install, WC_Install::install, WC_Install::create_tables, dbDelta
WordPress database error Multiple primary key defined for query ALTER TABLE wptests_woocommerce_sessions ADD PRIMARY KEY  session_key (session_key) made by PHPUnit_TextUI_Command::main, PHPUnit_TextUI_Command->run, PHPUnit_TextUI_TestRunner->doRun, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestCase->run, PHPUnit_Framework_TestResult->run, PHPUnit_Framework_TestCase->runBare, PHPUnit_Framework_TestCase->runTest, ReflectionMethod->invokeArgs, WooCommerce\Tests\Util\WC_Tests_Install->test_install, WC_Install::install, WC_Install::create_tables, dbDelta

dbDelta requires very specific syntax (as per http://codex.wordpress.org/Creating_Tables_with_Plugins).
2015-11-05 13:43:56 +08:00
Shiva Poudel d9e8057df3 Tweak the dockblocks and periodic-ending fix 2015-11-04 00:05:08 +05:45
Claudio Sanches 5893875b0c Removed period for file headers 2015-11-03 11:53:50 -02:00
Claudio Sanches ee30b5b308 Fixed php docs standards 2015-11-03 11:31:20 -02:00
Mike Jolley 68cb6b11ee Removed welcome page
2.5 release doesn’t have enough user-facing features to justify a
full-blown welcome page, and translation credits are no longer
obtainable after translate.wordpress switch. Removed the page to keep
things streamlined.
@claudiosmweb @mattyza
2015-10-09 11:56:13 +01:00
Mike Jolley b913555d54 Change customer role caps
Fixes #9309. @claudiosmweb
2015-10-09 11:00:25 +01:00
Mike Jolley b27635409c New Session Handler
This merges and adapts
https://github.com/kloon/woocommerce-large-sessions for core. Closes
#6846.

Differences:
- Rather than delete each cache key individually, this invalidates all
at once (idea from https://core.trac.wordpress.org/ticket/4476)
- Removes ‘replace’ which increments session_id keys unnecessarily.
- Fixes remove/restore cart sessions from making it dirty each page load

Kudos to @kloon for the bulk of the work and testing on Woo.com.

cc @claudiosmweb
2015-10-07 14:47:29 +01:00
Mike Jolley 8149213c4b Add monthly cron schedule
@claudiosmweb
2015-09-03 16:21:53 +01:00
Mike Jolley 3c7290a765 During updates, only recreate .htaccess if not using redirect download method.
Fixes #8923
2015-08-24 13:50:14 +01:00
Claudio Sanches b1f0da9d76 Version 2.4.1 2015-08-10 18:44:32 -03:00
Claudio Sanches a572c40405 Added the update script for 2.4.1 2015-08-10 18:27:07 -03:00
Mike Jolley 61cb48afd7 Tweak wc ajax to post to the CURRENT URL rather than a fixed endpoint 2015-07-31 12:56:27 +01:00
Claudio Sanches 9e41552342 Removed all "@return void" 2015-07-16 16:55:48 -03:00
Claudio Sanches e0be5a2e9f Added truncated consumer key and last access fields in woocommerce_api_keys table 2015-07-16 15:42:00 -03:00
Mike Jolley 18c6a940f1 Merge branch 'onboarding'
Conflicts:
	assets/css/admin.css
	assets/css/select2.css
	assets/css/woocommerce-layout.css
	assets/css/woocommerce.css
	assets/js/admin/order-backbone-modal.min.js
	includes/admin/class-wc-admin-help.php
	includes/admin/class-wc-admin.php
	includes/admin/views/html-admin-page-status-report.php
	includes/admin/views/html-notice-install.php
	includes/admin/views/html-notice-template-check.php
	includes/admin/views/html-notice-theme-support.php
	includes/admin/views/html-notice-tracking.php
	includes/class-wc-install.php
	includes/class-wc-language-pack-upgrader.php

includes/shipping/international-delivery/class-wc-shipping-international
-delivery.php
2015-07-04 23:11:12 +01:00
Justin Shreve 6a1d3f0032 In create_tables, drop the location_type_code index before doing a dbDelta, otherwise a duplicate key error occurs. 2015-06-19 00:47:18 +00:00
Justin Shreve 910bcc7100 Index only the prefix of location_code when creating the tax_rate_locations table
Otherwise we hit a max key limit of 1000 with utf8 (since multiple bytes are stored per characater).
2015-06-15 16:45:30 +00:00
Claudio Sanches 7ee65c0256 Improved the woocommerce_api_keys table 2015-06-08 20:04:29 -03:00
Claudio Sanches 9eb3b6ddf9 Changed all requests with wp_remote_* to wp_safe_remote_* 2015-06-01 13:28:55 +01:00
Mike Jolley 3d049ff379 [2.3] Clear expired transients on update 2015-06-01 11:39:03 +01:00
Claudio Sanches 903cb817f0 Fixed WC_Install::get_schema for woocommerce_api_keys table 2015-05-28 10:36:25 -03:00
Claudio Sanches 676e09fdd3 Added new woocommerce_api_keys table in wpmu exclude and in status report 2015-05-27 16:46:43 -03:00
Claudio Sanches 84c937c011 Improved the woocommerce_api_keys table 2015-05-15 22:52:00 -03:00
Claudio Sanches bee1fba738 Added nonces field in woocommerce_api_keys table 2015-05-15 18:25:41 -03:00
Claudio Sanches 41e8f69a70 Fixed the woocommerce_api_keys name 2015-05-15 18:20:49 -03:00
Claudio Sanches 0ecfc26a84 Created new database for api_apps
@mikejolley
2015-05-15 17:57:18 -03:00
Mike Jolley b5ec1d98a7 Error in installer 2015-04-30 14:03:31 +01:00
Mike Jolley c9ce3baceb Load settings from DB in case of re-run 2015-04-29 14:55:12 +01:00
Mike Jolley 54fa1e34d3 Show notice when pages don't exist, and set gateway defaults 2015-04-29 13:21:01 +01:00
Mike Jolley e454c52e58 Optimise admin redirect function 2015-04-29 11:24:29 +01:00
Mike Jolley 7263a4ace2 woocommerce_enable_setup_wizard filter 2015-04-29 10:59:59 +01:00
Mike Jolley 4b92f642b3 Trigger wizard on install 2015-04-29 10:47:57 +01:00
Claudio Sanches db23f5faa0 Create initial WC_Auth class and endpoint 2015-04-17 17:41:25 -03:00
Mike Jolley 9638d16d82 Define update file 2015-03-25 11:11:08 +00:00
Mike Jolley 17ca08c020 add endpoints on install 2015-03-20 14:20:12 +00:00
Gerhard c9d4655ef1 When running update_option it does not always clear memcache, a workaround is to run delete_option and then add_option instead. 2015-03-11 12:26:51 +02:00
Mike Jolley 5ec61e3acd Tweak transient welcome redirect 2015-02-17 15:24:12 +00:00
Mike Jolley bc2af10cc6 Update languages and geolocation when installed 2015-02-11 14:38:55 +00:00
Mike Jolley 2a877eb562 Do a db query to flush spent and count which may be incorrect/outdated
Closes #7286
2015-02-04 14:22:15 +00:00
Mike Jolley 15fa903537 install() is triggered after includes, so these includes are not needed 2015-01-28 19:46:09 +00:00
Mike Jolley 725d5e28d8 Additional tweaks to @b2c573ed8a04a8d425a73e018a450179514cbdc7
- Load API with other includes
- Register activation hook early
- Include autoloader early

cc @claudiosmweb
2015-01-28 17:50:58 +00:00
Mike Jolley 5ffaf97397 Only load tracking during cron and move notices to notices class 2015-01-23 16:36:52 +00:00
Mike Jolley 09ae877b96 defined check 2015-01-23 13:29:23 +00:00
Mike Jolley b289c9446c WC_INSTALLING constant - don't create options for any gateways/shipping methods during install. 2015-01-23 13:05:38 +00:00
Mike Jolley 586025b17e Ensure settings are installed for all sections and subsections
Fixes #7181
2015-01-23 12:36:22 +00:00
Mike Jolley 2d8f021cc7 Optimise the admin notices class.
@claudiosmweb
2015-01-20 15:23:34 +00:00
Mike Jolley caac9768a7 Added more fallbacks for API geoIP 2014-12-30 11:11:17 +00:00
Mike Jolley ef3ad7d99f Setup cron jobs 2014-12-23 18:49:43 +00:00
Mike Jolley 8df8c9b482 Make 'public', and rewrite, optional for attributes
#6852
2014-12-22 14:16:15 +00:00
Mike Jolley dbcc8430e9 Installer tweaks + unit tests closes #6356 2014-11-25 17:09:24 +00:00
claudiosmweb 8eeb6fc204 Removed more some unused code 2014-11-19 22:43:09 -02:00
claudiosmweb 861a34c348 Removed the frontend styles setting #6589 2014-10-21 20:12:39 -02:00
Mike Jolley 38000b1785 Define WC tables in wpmu_drop_tables
Closes #5396
2014-10-10 14:48:08 +01:00
claudiosmweb 2a255de172 changed the LESS compiler to SCSS compiler #5606 2014-09-22 15:30:07 -03:00
shivapoudel a4ec52f788 Absolute path fix for class-wc-install.php 2014-09-21 00:35:02 +05:45
claudiosmweb 3c4177a579 prevented errors in the installation caused by old plugins 2014-09-10 13:35:46 -03:00
Mike Jolley 40c528dc3a Queue language check on install + store checked lang code in option
@claudiosmweb
2014-09-04 09:37:24 +01:00
shivapoudel 1ae67fb37e Change title for API Docs #6132 2014-09-02 00:02:51 +05:45
shivapoudel 86c1e7ed01 Change title for Documentation #6132 2014-09-02 00:02:11 +05:45
Mike Jolley 689272f9b9 Change title text from #6132 2014-09-01 12:46:37 +01:00
Mike Jolley f9af86ee1d Merge pull request #6132 from axisthemes/action-links
Action links Has now Better Look in Multisite Too.
2014-09-01 12:44:34 +01:00
Shiva Poudel 7ddedad4a7 Time Constant HOUR_IN_SECONDS
_wc_activation_redirect transient have HOUR_IN_SECONDS instead `60*60`.
2014-08-31 00:38:48 +05:45
shivapoudel 513cd24751 Filter hook is not necessary for plugin_action_links 2014-08-30 00:50:09 +05:45
shivapoudel c6c7353d4a Filter hook is not necessary for plugin_row_meta 2014-08-30 00:49:25 +05:45
shivapoudel a3107a03a9 Reverted Documentation to Docs 2014-08-30 00:47:00 +05:45
shivapoudel e9877726a1 Documentation will be better than Short Docs 2014-08-30 00:33:00 +05:45
shivapoudel 390e178962 Added API Docs too 2014-08-30 00:27:36 +05:45
shivapoudel d965f797c2 Fixed the missing comma :) 2014-08-29 23:46:31 +05:45
shivapoudel 40d66b2f57 Added Docs and Support URL in plugin_row_meta which was removed from plugin_action_links 2014-08-29 23:39:17 +05:45
shivapoudel ec64534cb7 Removed docs and support Url from plugin_action_links so that we can add it in plugin_row_meta 2014-08-29 23:28:06 +05:45