Commit Graph

28291 Commits

Author SHA1 Message Date
Shohei Tanaka fdc9d42dc4
If email @local include non alphabet
If I input infoおおお@test.com as billing email address, automatically change to info@test.com by sanitize_email function.

So at first check the email address by is_email function, after that we must use sanitize_email function.
2018-07-27 00:18:09 +09:00
Peter Fabian 4e7bc117e4 Update unit tests. 2018-07-26 15:11:24 +02:00
Peter Fabian 9bca5abb40 Cast tax rate to float so that it can be treated as number going forward.
In case no tax rate is specified for the default catch-all tax rate, the tax rate was an empty string which caused a PHP notice when it was later used in arithmetic operations.
2018-07-26 14:32:48 +02:00
Kanishk 4fc06834b6 Fix for #20904 2018-07-26 15:12:28 +05:30
Claudio Sanches 575575d280 Fixed reset password cookie when REQUEST_URI includes cyrillic alphabet
WordPress core doesn't try to satinize this either.
See: ae2b929294/wp-login.php (L646)

Closes #20895
2018-07-25 20:33:11 -03:00
Rodrigo Primo 424956c6f6 3.4.4 changelog 2018-07-25 15:16:46 -03:00
Claudiu Lodromanean b76667796a
Merge pull request #20886 from woocommerce/fix/20871
Re-add woocommerce_order_details_after_customer_details_filter
2018-07-25 08:39:43 -07:00
Claudiu Lodromanean a396312b85
Merge pull request #20889 from woocommerce/fix/20885
Do not hide coupon form when a coupon is applied
2018-07-25 08:08:55 -07:00
claudiulodro 737dbbf36a phpcs fixes 2018-07-25 08:05:01 -07:00
Gerhard Potgieter 71d52e401a
Merge pull request #20758 from woocommerce/update/core-function-unit-tests
Improve core functions test coverage
2018-07-25 14:23:48 +02:00
Gerhard Potgieter d050f6af50
Merge pull request #20801 from LuigiPulcini/LuigiPulcini-patch-1
Adding product data to `removed_from_cart` event
2018-07-25 14:14:14 +02:00
Gerhard Potgieter 73b80c9241 Remove extra asterisk 2018-07-25 14:09:04 +02:00
Gerhard Potgieter 5a0d3c8bf7 Fix indentation issues caused by github conflict tool 2018-07-25 14:07:57 +02:00
Gerhard Potgieter da82639ebc
Merge branch 'master' into update/core-function-unit-tests 2018-07-25 14:05:12 +02:00
Gerhard Potgieter 20a6c40bdf
Merge pull request #20856 from woocommerce/fix/custom-menu-order
Allow custom menu ordering when set by another filter
2018-07-25 13:55:58 +02:00
Gerhard Potgieter 8af8a77572 Bump template version 2018-07-25 08:04:25 +02:00
Gerhard Potgieter 9e207c9c11 You can apply more than one coupon, make sure to not hide the form when a coupon is already applied. 2018-07-25 08:03:17 +02:00
Brent Shepherd e00e728f1f Merge branch 'master' into issue_18003 2018-07-25 14:41:56 +10:00
claudiulodro 46b5794d63 Re-add woocommerce_order_details_after_customer_details_filter 2018-07-24 12:53:29 -07:00
Claudiu Lodromanean 59de4c7148
Merge pull request #20879 from woocommerce/fix/20671
Update redirect option during activation of MailChimp in Install Wizard.
2018-07-24 11:07:00 -07:00
Claudiu Lodromanean 4c945f2e7e
Merge pull request #20854 from EmranAhmed/master
Prevent JS Issue if `woocommerce_available_variation` filter return false
2018-07-24 10:50:08 -07:00
Claudiu Lodromanean 9e3da78c73
Merge pull request #20853 from woocommerce/reduce-test-suite-execution-time
Reduce WC_Tests_REST_System_Status tests execution time
2018-07-24 10:46:26 -07:00
Claudiu Lodromanean 4016925616
Merge pull request #20818 from woocommerce/fix/20797-2
Removed 100% width on images on single product page for 2017 theme
2018-07-24 10:40:42 -07:00
Claudiu Lodromanean 9886d678bb
Merge pull request #20812 from woocommerce/fix/20804
Do not build paypal pay link when no base country is set.
2018-07-24 10:31:34 -07:00
Claudiu Lodromanean 8cde592c54
Merge pull request #20787 from thenbrent/error_log_file_line
Expand fatal error logging and add file/line number to log entries
2018-07-24 10:28:38 -07:00
Claudiu Lodromanean a0b4a8df03
Merge pull request #20611 from woocommerce/fix/20349
Allow filtering variations by attributes in API.
2018-07-24 10:25:36 -07:00
Claudiu Lodromanean 87acfa731d
Merge pull request #20260 from leglesslizard/master
Set low stock notification threshold per product
2018-07-24 10:23:15 -07:00
Rodrigo Primo 558408da28 Check if $product is an instance of WC_Product before using its methods
Doing this to protect against the fatal error reported in issue #20880. I was not able to reproduce this problem but adding this check is probably a good idea anyway.
2018-07-24 11:00:37 -03:00
Rodrigo Primo 4ceee4cfc9 Fix phpcs violations 2018-07-24 10:50:19 -03:00
Peter Fabian d679a88156 Update redirect option during activation of MailChimp in Install Wizard. 2018-07-24 12:29:10 +02:00
LuigiPulcini 79cda7c2bc
Update add-to-cart.js 2018-07-23 08:11:21 -07:00
Gerhard Potgieter 7143b67189 Include setting category to product export test 2018-07-23 12:26:58 +02:00
Gerhard Potgieter 865f724187 Add category filter to product export functionality. 2018-07-23 11:59:01 +02:00
Peter Fabian a19fff2da0
Merge pull request #20861 from rnaby/200718-225157-wc-csv-exporter
PHPDoc | Return type changed from array to string.
2018-07-23 11:07:19 +02:00
Peter Fabian a8eac15e5b Regenerate CSS after master merge. 2018-07-21 22:17:54 +02:00
Peter Fabian d9202ed6be Merge branch 'master' into fix/20797-2 2018-07-21 22:06:46 +02:00
Khan M Rashedun-Naby 90b6f98582 PHPDoc | Return type changed to string from array. 2018-07-20 22:59:41 +06:00
Khan M Rashedun-Naby eb104ecd17 PHPDoc | Return type changed from array to string. 2018-07-20 22:53:16 +06:00
Emran Ahmed f0151ca873
Re-indexing `get_available_variations` method values when `woocommerce_available_variation` filter return false.
### All Submissions:

* [x] Have you followed the [WooCommerce Contributing guideline](https://github.com/woocommerce/woocommerce/blob/master/.github/CONTRIBUTING.md)?
* [x] Does your code follow the [WordPress' coding standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/)?
* [x] Have you checked to ensure there aren't other open [Pull Requests](../../pulls) for the same update/change?

<!-- Mark completed items with an [x] -->

<!-- You can erase any parts of this template not applicable to your Pull Request. -->

### Changes proposed in this Pull Request:

Re-indexing `get_available_variations` method values.

Suppose you made changed with `woocommerce_available_variation` hook and skip returning some specific variation product with false value. There is `array_filter` function to filter empty values from `get_available_variations` but it keeps index which convert to js object rather then array on `single-product/add-to-cart/variable.php` template variation form `data-product_variations` attribute, and select box dropdown doesn't show. I just added `array_values` PHP function to reindex after `array_filter` function which convert to js array rather then js object before `get_available_variations` function return.

Closes # .

### How to test the changes in this Pull Request:

1. Before approving pull req just return false on a specific variation via `woocommerce_available_variation` filter.
2. Now check that variation product dropdown doesn't show. Because it needs to reindex array.

### Other information:

* [x] Have you added an explanation of what your changes do and why you'd like us to include them?
* [ ] Have you written new tests for your changes, as applicable?
* [x] Have you successfully ran tests with your changes locally?

<!-- Mark completed items with an [x] -->

### Changelog entry

> Enter a short summary of all changes on this Pull Request. This will appear in the changelog if accepted.
2018-07-20 20:14:57 +06:00
Gerhard Potgieter 8aba169654 Switch travis codecoverage from xdebug to phpdbg (#20857)
This commit changes the travis codecoverage from using xdebug to phpdbg, phpdbg seems much faster and gives similar results.

Reason for switching is we have been running into constant timeouts on our codecoverage due to the 50min job limit on travis, which means our codecoverage has not been updated in a couple of months.

* Remove xdebug as it slows tests down, switch to using phpdbg for code coverage.

* Update parameters for phpdbg

* It is qrr not qqr

* Include vendor/bin path when using phpdbg

* Use PHP 7.1 to run phpdbg

* Update phpunit dire

* Include $HOME in phpdbg call to phpunit

* Set no memory limit to avoid out of memory errors.

* Assign timeout group to test_request_url test for paypal and do not execute that on coverage as it causes a memeory timeout. Test needs optimization to run for code coverage.

* @covers usage for methods should be prefixed with ::
2018-07-20 09:34:43 -03:00
Alex Sanford 0e1ec203cd Allow custom menu ordering when set by another filter
This fixes the case where another plugin sets custom menu ordering to be
true, but its filter runs before WooCommerce's filter. Otherwise
WooCommerce's filter will return false, and disallow the other plugin to
customize its menu items.
2018-07-19 17:39:41 -03:00
Emran Ahmed 33949f3c25
Prevent JS Issue if `woocommerce_available_variation` return false for a variation.
After checking some condition if `woocommerce_available_variation` filter return false. Then Option list don't show because of JS issue.
2018-07-20 01:33:25 +06:00
Rodrigo Primo f47c9e7842 Reduce WC_Tests_REST_System_Status tests execution time
This commit changes WC_Tests_REST_System_Status tests to use artificial HTTP responses instead of performing external HTTP requests. With this change execution time for these tests droped from 22s to 3s.
2018-07-19 14:22:29 -03:00
Rodrigo Primo 1860cd1933 Change WC_Unit_Test_Case to extend WP_HTTP_TestCase instead of WP_UnitTestCase
This commits changes WC_Unit_Test_Case parent class to WP_HTTP_TestCase (which extends WP_UnitTestCase). This way all WC core test classes can benefit from the functionality provided by WP_HTTP_TestCase if needed. This is necessary because otherwise test classes can use the functionality provided by WC_Unit_Test_Case or WP_HTTP_TestCase. This change should not affect test classes that don't explicitly call one of the WP_HTTP_TestCase features.
2018-07-19 14:17:06 -03:00
Peter Fabian b9cdc760ac
Merge pull request #20817 from keefyhub/master
Add class names to `edit_category_fields()` to be inline with other f…
2018-07-19 18:45:00 +02:00
Gerhard Potgieter 990ab6a910
Merge pull request #20850 from rodrigoprimo/oembed-test
Use an artificial HTTP response for wc_do_oembeds() test
2018-07-19 17:30:44 +02:00
Rodrigo Primo 1d13dd4dd4 Use an artificial HTTP response for wc_do_oembeds() test
Doing this to speed up the test as an HTTP request to an external server is slow and also because it should fix this test that has been failing on Travis only for an unknown reason.
2018-07-19 10:35:32 -03:00
Rodrigo Primo fb9aa71b33 Undoing DB changes on tearDown() is not necessary
WP test suite starts a transaction when the test starts and roll it back when the test finishes. So it is not necessary to undo database changes using tearDown().
2018-07-19 10:35:19 -03:00
Peter Fabian 15e44897f6
Merge pull request #20849 from woocommerce/fix/20838
Add a margin to the bestseller widget product title
2018-07-19 14:27:33 +02:00
Gerhard Potgieter 67b46aadf8 Include postcss task in the watch to be the same as grunt css 2018-07-19 14:12:12 +02:00