Commit Graph

19405 Commits

Author SHA1 Message Date
vedanshujain 47ba1d49da Cascade to return null to prevent notice when array is empty.
Another situation where this change is required when there are two coupons in an order but only one coupon has limit. In this case array will be present but one of the coupon will not have a corresponding record which will throw a notice.
2019-12-17 19:13:19 +05:30
vedanshujain 53bfcea110 Use same filter for stocks and coupon for consistency. 2019-12-17 19:13:19 +05:30
vedanshujain 72545c44b7 Add support for `_held_for_checkout` records to improve performance.
This will also improve transactional stability and avoid race conditions by providing a way to lock usage counts.
2019-12-17 19:13:19 +05:30
Rodrigo Primo 9c4de8f5e7 Fix indentation 2019-12-13 16:48:17 -03:00
Rodrigo Primo d451b68488
Merge pull request #24929 from helgatheviking/feature/woocommerce_process_variation_object
Add woocommerce_admin_process_variation_object before $variation->save()
2019-12-13 16:46:22 -03:00
Rodrigo Primo 00c40dab1a
Add pay order product has enough stock filter (#25230)
* [#25021] Add filter when checking if product has enough stock while paying for order

* [#25021] Retain original < check, invert bool

* [#25021] Make filter more readable
2019-12-13 11:16:30 -03:00
Rodrigo Primo e963d7cfab Fix minor imprecision in wc_is_wp_default_theme_active() documentation 2019-12-13 09:59:20 -03:00
Peter Fabian 72925ef41c Centralize check for default themes.
This should make Storefront appear in the Setup Wizard again.
2019-12-11 18:35:04 +01:00
Claudio Sanches 2975b3a7b7 Rate limit feature 2019-12-11 01:38:19 -03:00
Claudio Sanches 589d8c4591 Updated WooCommerce::$version 2019-12-10 22:55:08 -03:00
Claudio Sanches f7632de06e
Merge pull request #25164 from om4james/webhook-delete-cache
Delete cached webhook data when a webhook is deleted
2019-12-10 22:45:42 -03:00
Claudio Sanches 02ae29c8fc Fixed support to older versions of WordPress 2019-12-10 22:12:50 -03:00
dsmithweb 5a17c63cc9 Update links 2019-12-10 18:41:55 -06:00
Claudio Sanches 57d5c88b13
Merge pull request #24876 from akshaya-rane/fix-product-bulk-edit
refs #24638 Fixed Stock status update on Bulk Edit
2019-12-10 12:29:48 -03:00
Peter Fabian d8f49787a4 Better reflect variable purpose with updated name. 2019-12-10 14:22:30 +01:00
Peter Fabian fd66112bb7 Add WP version number class to Setup Wizard/OBW body element. 2019-12-10 13:32:13 +01:00
Claudio Sanches 104f40c36e
Merge pull request #24281 from woocommerce/fix/24269
Handle multiple decimal points
2019-12-09 14:07:29 -03:00
Andrej Mernik d20d429e32 Add postcode validation for Slovenia (#25174)
Add postcode validation for Slovenia
2019-12-09 10:09:45 -03:00
Claudio Sanches 85635773e9 Fixed coding standards 2019-12-06 12:51:10 -03:00
Claudio Sanches 78e382e4d6 Fixed incorrect concatenation of variation sale prices with ".00" 2019-12-06 12:37:23 -03:00
Claudio Sanches 0d1d0d6653 Fixed coding standards 2019-12-06 11:18:13 -03:00
Claudio Sanches b4af5f3c89 Updated regex to allow only one decimal point 2019-12-06 11:11:47 -03:00
James Collins 0246b02a94 Merge branch 'master' into webhook-delete-cache 2019-12-06 08:57:54 +08:00
Khokan Sardar 51252a6f8e Fixed issue #24575 (#24586)
* Fixed issue #24575

* Fixed implementation for #24575
2019-12-05 21:23:40 -03:00
Juancho Pestana b8217fa080 Fix #24365: Prevent billing address from being updated on shipping update. (#24374)
* Prevent billing address from being updated on shipping update.

* Set billing address if empty.

* Fix coding standard issue.

* Fixed missing tab
2019-12-05 21:17:01 -03:00
Claudio Sanches 5dac360e8a
Merge pull request #24208 from woocommerce/fix/order-screen-tax-calculation-to-honor-rounding-setting
Honor tax rounding preference in edit item and refund flows
2019-12-05 20:52:48 -03:00
Claudio Sanches 2e94410dc4
Merge pull request #24683 from n-dawson/fix-archive-orderby-param
Refine static homepage check to exclude blog archive queries. Fixes #…
2019-12-05 20:41:59 -03:00
Claudio Sanches 4ea81923da
Merge pull request #24935 from woocommerce/fix/24845-wpcom-customizer
Do not run send_frame_options_header when on the customizer
2019-12-05 20:28:55 -03:00
Rodrigo Primo 27915dd696 Exception when WC_Product_Variation is instantiated with the wrong type
This commits changes WC_Product_Variation to raise an exception when the
class is instantiated with an ID that belongs to a post object that is
not a product variation.

This is necessary to avoid problems like the one described in #24956
where passing a variable product ID to WC_Product_Variation would result
in transparently modifying the variable product title and excerpt.
2019-12-05 15:45:48 -03:00
Rodrigo Primo 61a843679a Fix WPCS violations automatically using phpcbf 2019-12-05 15:45:12 -03:00
Claudio Sanches d7e2a98aaf
Merge pull request #24828 from woocommerce/fix/24695
Adds shared code between Orders and Cart calculation logic.
2019-12-05 12:39:50 -03:00
Peter Fabian 44d39c369e Fixed the PHPCS to reflect new rules. 2019-12-05 16:00:18 +01:00
Peter Fabian 4dfa68b62d More PHPCS fixes. 2019-12-05 15:46:13 +01:00
Peter Fabian 2e81f21e29 Improved variable naming and comments. 2019-12-05 15:37:33 +01:00
Peter Fabian 159199f254 Check the nonce before the rate limiting. 2019-12-05 15:36:50 +01:00
Peter Fabian 85c4a5beed PHPCS fixes. 2019-12-05 15:30:53 +01:00
Gerhard Potgieter 7d39222334
Merge pull request #25162 from woocommerce/fix/24018
Hid variable parent products from "Add Products" search on order page
2019-12-05 14:22:43 +02:00
Rodrigo Primo 6b61d5f025
Merge pull request #24934 from woocommerce/add/filter_invalid_variations_notice
Introduce show_invalid_variations_notice filter
2019-12-05 09:08:24 -03:00
Peter Fabian 0d3074a554 Added rate limiting to Add payment method. 2019-12-05 12:03:02 +01:00
Gerhard 216a86b558 Change filter name to woocommerce_show_invalid_variations_notice and also pass through the $product_object variable. 2019-12-05 08:08:07 +02:00
Christopher Allford b67d094601 Added support for comma-delimited lists of types to exclude 2019-12-04 14:39:41 -08:00
Rodrigo Primo 3af024fc5c
Merge pull request #25031 from woocommerce/feature/24956
Introduced wc_get_product_object() helper
2019-12-04 16:53:04 -03:00
Rodrigo Primo aaea7b1c55
Merge pull request #25001 from woocommerce/feature/inline-notices
Initial support to inline notices
2019-12-04 16:50:40 -03:00
Rodrigo Primo fe0c1c441e
Merge pull request #24852 from JacobMC/remove_function_causing_php_error
Refactor to remove PHP 7 Error
2019-12-04 16:29:11 -03:00
Claudio Sanches e3b2d9f10c Merge branch 'master' into feature/inline-notices 2019-12-04 16:26:10 -03:00
Claudio Sanches 5fdb880831
Merge branch 'master' into feature/24956 2019-12-04 16:18:39 -03:00
Claudio Sanches 8033d5751e Changed wc_get_product_classname function name to wc_get_product_object 2019-12-04 16:15:16 -03:00
Claudio Sanches a12c25862b
Revert "Add support for '_held_for_checkout` records to prevent race conditions." 2019-12-04 16:03:05 -03:00
Claudio Sanches 0686e6f1cd
Merge pull request #25000 from woocommerce/feature/pay-button-support
Initial support for "pay button"
2019-12-04 16:02:02 -03:00
Claudio Sanches f07ed76e43 Fixed coding standards 2019-12-04 15:53:48 -03:00