woocommerce/includes
Gerhard Potgieter 36d1c318cb Download Log FK Contraint check (#20478)
This PR introduces a check on the permission_id FK to ensure that it is not added multiple times on upgrades. It also names the key specifically to ensure future changes to the key can be targeted properly and removes old keys that were added since 3.4.0.

* Add FK check before adding the FK. Also give the FK a name to avoid auto generated names and duplicate keys.

* Remove additional OR

* Remove additional OR

* Final FK check query

* Add foreign key cleanup routine to 3.4.3 db version

* Only check on named foreign key now that we have a cleanup routine in place, use specific phpcignore

* Rework formatting of SQL query

* Change way to fetch and add FK, can't use procedural SQL, needs to be done via statements.

* Add table name to lookup

* Only clean up FK on the wc_download_log table

* Remove erenouse bracket
2018-06-18 11:47:47 -03:00
..
abstracts Merge pull request #20546 from woocommerce/fix/20509 2018-06-15 09:23:27 -07:00
admin Merge branch 'master' into update/13359 2018-06-15 15:12:12 +01:00
api Merge pull request #20537 from woocommerce/update/transactions-revert 2018-06-15 09:11:23 -07:00
cli per_page must be between 1 and 100, default to 100. 2018-03-28 10:18:10 +02:00
customizer Preview checkout without dummy product 2018-05-22 11:19:09 +01:00
data-stores Merge pull request #20537 from woocommerce/update/transactions-revert 2018-06-15 09:11:23 -07:00
emails Hook doc update 2018-05-02 14:28:53 +01:00
export Wrap cell in ' rather than prepend 2018-05-11 12:16:02 +01:00
gateways Merge branch 'master' into update/13359 2018-06-15 15:12:12 +01:00
import Wrap cell in ' rather than prepend 2018-05-11 12:16:02 +01:00
interfaces PHPCS passing for class-wc-webhook-data-store-interface.php 2018-03-06 12:00:33 +02:00
legacy Removed obvious boolean results 2018-03-21 19:57:10 -03:00
libraries Merge pull request #19419 from woocommerce/feature/18477 2018-03-26 11:31:21 +01:00
log-handlers clear_expired_logs and date based clearing functions 2018-05-01 16:37:30 +01:00
payment-tokens Use display name for tokens 2018-05-03 12:00:07 +02:00
shipping Fix phpcs violations in includes/shipping/local-pickup/class-wc-shipping-local-pickup.php 2018-03-07 15:30:26 -03:00
shortcodes Merge branch 'master' into update/13359 2018-06-15 15:12:12 +01:00
theme-support Adds missing 2017 RTL styles 2018-05-31 10:34:08 +01:00
walkers Restored old walkers files to keep backwards compatibility 2018-03-09 17:14:02 -03:00
widgets Use correct escaping on placeholder 2018-06-04 10:53:10 +01:00
class-wc-ajax.php Merge pull request #20470 from woocommerce/update/20454 2018-06-15 09:03:07 -07:00
class-wc-api.php Fixed includes/class-wc-api.php PHPCS violations 2018-03-15 17:35:40 -03:00
class-wc-auth.php Remove API enabled check from auth endpoint 2018-06-12 12:37:36 +01:00
class-wc-autoloader.php Fixed includes/class-wc-autoloader.php PHPCS violations 2018-03-15 18:13:26 -03:00
class-wc-background-emailer.php Fixed includes/class-wc-background-emailer.php PHPCS violations 2018-03-15 18:22:12 -03:00
class-wc-background-updater.php Correct code to run again 2018-05-25 16:36:07 +01:00
class-wc-breadcrumb.php Fixed includes/class-wc-breadcrumb.php PHPCS violations 2018-03-15 18:30:08 -03:00
class-wc-cache-helper.php Clear version cache if time is unchanged 2018-06-15 13:56:23 +01:00
class-wc-cart-fees.php Fixed includes/class-wc-cart-fees.php PHPCS violations 2018-03-16 14:43:53 -03:00
class-wc-cart-session.php Prime caches 2018-05-01 12:39:18 +01:00
class-wc-cart-totals.php No need to load tax rates when taxes are disabled 2018-05-01 11:56:39 +01:00
class-wc-cart.php Merge branch 'master' into update/13359 2018-06-15 15:12:12 +01:00
class-wc-checkout.php Merge branch 'master' 2018-06-07 11:24:12 +01:00
class-wc-cli.php Short ASBPATH check 2018-03-19 19:28:37 -03:00
class-wc-comments.php Fixed includes/class-wc-comments.php PHPCS violations 2018-03-19 19:39:31 -03:00
class-wc-countries.php Remove malta state field 2018-06-11 11:23:27 -04:00
class-wc-coupon.php Made constructor more readable with protected method 2018-05-24 18:19:42 +01:00
class-wc-customer-download-log.php Fixed includes/class-wc-customer-download-log.php PHPCS violations 2018-03-19 20:01:52 -03:00
class-wc-customer-download.php Moved check for download log to WC_Download_Handler. 2018-05-09 15:52:02 +02:00
class-wc-customer.php Fixed includes/class-wc-customer.php PHPCS violations 2018-03-19 20:15:16 -03:00
class-wc-data-exception.php Fixed includes/class-wc-data-exception.php PHPCS violations 2018-03-19 20:17:56 -03:00
class-wc-data-store.php WC_Data_Store | Exception throwing @throws PHPDoc comment added (#20352) 2018-06-04 10:45:53 +01:00
class-wc-datetime.php getOffset Refactor 2018-06-02 23:47:05 +06:00
class-wc-deprecated-action-hooks.php Hook mapping/bw compat 2018-04-16 14:27:03 +01:00
class-wc-deprecated-filter-hooks.php Hook mapping/bw compat 2018-04-16 14:27:03 +01:00
class-wc-discounts.php Handle item limit for custom coupon types 2018-06-08 14:18:16 -04:00
class-wc-download-handler.php If the file size cannot be read, ignore range headers. 2018-05-24 16:10:45 +01:00
class-wc-emails.php Log errors from transaction emails with logger 2018-05-24 15:37:00 +01:00
class-wc-embed.php Fixed includes/class-wc-embed.php PHPCS violations 2018-03-21 00:02:57 -03:00
class-wc-form-handler.php More customistion options for terms and conditions. 2018-04-06 11:43:30 +01:00
class-wc-frontend-scripts.php Version 2018-06-05 12:38:03 +01:00
class-wc-geo-ip.php Deprecated old WC_Geo_IP class 2018-03-15 17:23:40 -03:00
class-wc-geolite-integration.php Load GeoLite2 Reader when creating a new instance of WC_Geolite_Integration 2018-03-15 17:30:17 -03:00
class-wc-geolocation.php X_FORWARDED_FOR standard states either just an IP or a comma seperated list of IP, Proxy, Proxy, ... 2018-06-11 10:49:03 +02:00
class-wc-https.php Fix phpdoc to include params and correct types 2017-05-15 13:50:52 +02:00
class-wc-install.php Download Log FK Contraint check (#20478) 2018-06-18 11:47:47 -03:00
class-wc-integrations.php Fixed includes/class-wc-integrations.php PHPCS violations 2018-03-21 00:07:37 -03:00
class-wc-log-levels.php Fixed includes/class-wc-log-levels.php PHPCS violations 2018-03-21 00:08:59 -03:00
class-wc-logger.php clear_expired_logs and date based clearing functions 2018-05-01 16:37:30 +01:00
class-wc-meta-data.php WC_Meta_Data | PHPDoc Fix (#20371) 2018-06-05 13:29:56 +01:00
class-wc-order-factory.php Make Order Factory return an int as well from $post->ID 2018-04-13 11:27:30 +01:00
class-wc-order-item-coupon.php Fixed includes/class-wc-order-item-coupon.php PHPCS violations 2018-03-21 00:33:44 -03:00
class-wc-order-item-fee.php Fixed includes/class-wc-order-item-fee.php PHPCS violations 2018-03-21 00:39:37 -03:00
class-wc-order-item-meta.php Pass `$flat` variable to `woocommerce_order_items_meta_display` filter 2018-04-23 13:45:07 +12:00
class-wc-order-item-product.php Fixed includes/class-wc-order-item-product.php PHPCS violations 2018-03-21 00:49:45 -03:00
class-wc-order-item-shipping.php Fixed includes/class-wc-order-item-shipping.php coding standards 2018-03-21 00:46:32 -03:00
class-wc-order-item-tax.php Fixed includes/class-wc-order-item-tax.php PHPCS violations 2018-03-21 00:52:55 -03:00
class-wc-order-item.php sanitize_text_field does not preserve line breaks. wp_kses_post seems more appropriate. 2018-04-10 13:09:20 +01:00
class-wc-order-query.php PHPDoc @throw Added (#20370) 2018-06-05 13:29:35 +01:00
class-wc-order-refund.php Improved class description 2018-03-21 00:50:30 -03:00
class-wc-order.php Remove wc_transaction_query in favour of logging 2018-06-14 14:39:18 +01:00
class-wc-payment-gateways.php Revert "Don't force default token gateway active by default" 2018-05-18 11:32:49 +01:00
class-wc-payment-tokens.php Fixed includes/class-wc-payment-tokens.php PHPCS violations 2018-03-21 19:45:27 -03:00
class-wc-post-data.php Fixed includes/class-wc-post-data.php PHPCS violations 2018-03-21 20:44:35 -03:00
class-wc-post-types.php Disable Gutenberg for products. 2018-03-27 13:28:03 +01:00
class-wc-privacy-background-process.php Inactive account handling 2018-04-30 15:38:45 +01:00
class-wc-privacy-erasers.php feedback 2018-05-18 21:28:51 +01:00
class-wc-privacy-exporters.php Merge pull request #20435 from rnaby/070618-212333-wc-privacy-exporters-customer_data_exporter 2018-06-08 11:34:42 -07:00
class-wc-privacy.php WooCommerce prefix only 2018-06-14 15:47:15 +01:00
class-wc-product-attribute.php Fixed includes/class-wc-product-attribute.php PHPCS violations 2018-03-22 15:07:06 -03:00
class-wc-product-download.php Fixed includes/class-wc-product-download.php PHPCS violations 2018-03-22 15:10:22 -03:00
class-wc-product-external.php Escape and decode amsersands correcrtly 2018-05-22 10:52:51 +01:00
class-wc-product-factory.php Make Product Factory use global $post instead of $GLOBALS['post'] 2018-04-13 11:29:33 +01:00
class-wc-product-grouped.php Prevent infinite loops when grouped products group each other 2018-05-09 14:05:05 +01:00
class-wc-product-query.php Fixed includes/class-wc-product-query.php PHPCS violations 2018-03-22 15:41:53 -03:00
class-wc-product-simple.php Fixed includes/class-wc-product-simple.php PHPCS violations 2018-03-22 15:43:51 -03:00
class-wc-product-variable.php Lazy load children and attributes for variable products 2018-05-01 11:57:00 +01:00
class-wc-product-variation.php Normalize parent tax class 2018-06-15 11:35:22 +01:00
class-wc-query.php Merge pull request #20391 from smazur/master 2018-06-05 13:52:30 +01:00
class-wc-regenerate-images-request.php Thumbnail mapping 2018-02-13 12:51:55 +00:00
class-wc-regenerate-images.php Fixed includes/class-wc-regenerate-images.php PHPCS violations 2018-03-21 00:14:07 -03:00
class-wc-register-wp-admin-settings.php Fixed includes/class-wc-register-wp-admin-settings.php PHPCS violations 2018-03-21 00:16:26 -03:00
class-wc-session-handler.php Fixed includes/class-wc-session-handler.php PHPCS violations 2018-03-21 00:18:01 -03:00
class-wc-shipping-rate.php Fixed includes/class-wc-shipping-rate.php PHPCS violations 2018-03-21 20:58:20 -03:00
class-wc-shipping-zone.php Fixed coding standards 2018-03-21 20:53:59 -03:00
class-wc-shipping-zones.php Pass through JSON context when getting zones for JSON responses and scripts 2018-05-09 17:41:33 +01:00
class-wc-shipping.php Fixed file and class dockblock 2018-03-21 20:54:10 -03:00
class-wc-shortcodes.php Remove output buffering 2018-04-19 18:27:29 +01:00
class-wc-structured-data.php Use `get_variation_price` method in structured data to grab min/max so filters are ran. 2018-03-26 12:54:17 +01:00
class-wc-tax.php Removed obvious boolean results 2018-03-21 19:57:10 -03:00
class-wc-template-loader.php Yoda, you must! 2018-04-24 07:18:09 +02:00
class-wc-tracker.php Wrapper function to get full mysql version string with mariadb handling 2018-05-25 11:15:30 +01:00
class-wc-validation.php Eircode regex 2018-05-03 11:26:13 +01:00
class-wc-webhook.php Do not log body for webhooks unless debug mode is turned on. 2018-04-30 16:24:23 +01:00
class-woocommerce.php Merge pull request #20000 from woocommerce/update/19983 2018-05-24 17:11:27 +01:00
wc-account-functions.php Add endpoints to account menu items filter 2018-05-06 09:56:28 +02:00
wc-attribute-functions.php Properly check for old and new slug while updating attributes 2018-03-12 15:52:26 -03:00
wc-cart-functions.php merge master 2018-06-11 13:46:04 +01:00
wc-conditional-functions.php If wp_doing_ajax is defined return it (#20421) 2018-06-07 10:21:22 +01:00
wc-core-functions.php Merge pull request #20425 from rnaby/070618-130531-wc-core-functions-wc_get_logger 2018-06-07 10:34:51 +01:00
wc-coupon-functions.php Fixed includes/wc-coupon-functions.php PHPCS violations 2018-03-07 18:40:48 -03:00
wc-deprecated-functions.php Introduced new wc_deprecated_hook function as alias to _deprecated_hook 2017-11-22 14:47:22 -02:00
wc-formatting-functions.php eircode formatting 2018-05-03 11:26:22 +01:00
wc-notice-functions.php Better callback 2018-04-19 18:37:07 +01:00
wc-order-functions.php Else Removed 2018-05-15 00:33:22 +06:00
wc-order-item-functions.php Fixed update/order-items-functions-phpcs PHPCS violations 2018-03-08 16:13:51 -03:00
wc-page-functions.php wc_list_pages function refactored 2018-05-15 08:08:18 +06:00
wc-product-functions.php Check object before calling one of its methods 2018-05-28 16:36:36 -03:00
wc-rest-functions.php align 2018-06-15 15:49:51 +01:00
wc-stock-functions.php Held stock qty check for pay page 2018-06-08 16:58:33 +01:00
wc-template-functions.php Merge branch 'master' of https://github.com/woocommerce/woocommerce 2018-06-11 18:14:30 +00:00
wc-template-hooks.php merge mistake 2018-06-07 11:26:19 +01:00
wc-term-functions.php wc_get_object_terms refactored 2018-05-15 15:44:32 +06:00
wc-update-functions.php Download Log FK Contraint check (#20478) 2018-06-18 11:47:47 -03:00
wc-user-functions.php Conform returned error messages 2018-06-12 15:48:59 +02:00
wc-webhook-functions.php PHPDoc @throws Added (#20381) 2018-06-05 13:30:16 +01:00
wc-widget-functions.php Fixed includes/wc-widget-functions.php PHPCS violations 2018-03-08 18:29:54 -03:00