Commit Graph

21481 Commits

Author SHA1 Message Date
Job 03a01b5e06
Update html-order-items.php 2021-06-09 12:55:13 +02:00
Job b020ac8814
"Pending payment" instead of "Pending" as the correct status
The tooltip suggests changing the status to "Pending" while the name of the status that is in the dropdown higher up is "Pending payment". This update changes that.
2021-06-09 11:54:37 +02:00
Nestor Soriano 039f81ea50
Implement the product attributes lookup table data creation.
Lookup entries for a product or a variation are created whenever
the product is created, including untrashing and duplication
(not yet when an existing product is modified).
2021-06-08 17:53:45 +02:00
Barry Hughes c503f5d637
Merge pull request #29896 from woocommerce/add/29610
Filter catalog products by attribute using the new lookup table
2021-06-08 07:37:06 -07:00
Nestor Soriano 0b1158cf5c
Small improvements in the filtering by attribute lookup table.
- Combined two 'if's in one
- Added extra santitization of term ids in the Filterer class
2021-06-08 10:18:35 +02:00
Nestor Soriano e54ff461f9
Implement the product attributes lookup table data deletion.
Lookup entries for a product or a variation are deleted whenever
the product is deleted or trashed.
2021-06-07 16:54:08 +02:00
Nestor Soriano 7f86d1988d
Remove superfluous 'delete' method in WC_Product_Variation class. 2021-06-07 16:52:22 +02:00
Vedanshu Jain f34ef00021
Merge pull request #30013 from woocommerce/fix/allow-block-templates
Allow block templates for WooCommerce pages
2021-06-05 14:11:21 +05:30
Nestor Soriano f237642af4
Refactor save method in WC_Product and WC_Product_Variable
The 'save' method in WC_Product_Variable was almost identical
to the parent method in WC_Product, only adding a few bits
of extra processing before and after the actual datastore save.
This commit adds a couple of protected methods,
before_data_store_save_or_update and after_data_store_save_or_update,
and implements them in WC_Product_Variable so that the extra
'save' method in WC_Product_Variable can be removed.
2021-06-04 12:21:29 +02:00
Vedanshu Jain 514367af28
Merge pull request #29987 from woocommerce/fix/29738
Set geolocation transients to expire in one day
2021-06-04 13:10:45 +05:30
Claudio Sanches d2d660a806 Remove ASBPATH check from interfaces 2021-06-03 13:02:19 -03:00
Mike Jolley 01f71d7564 Add phone to api 2021-06-03 14:05:30 +01:00
Mike Jolley e9db2d4522 Add shipping phone to user profile/order screen 2021-06-03 13:58:19 +01:00
Mike Jolley 9c7f886e13 Cleanup shipping phone in privacy classes 2021-06-03 13:57:00 +01:00
Mike Jolley e168702bb3 Add shipping phone to data stores 2021-06-03 13:55:37 +01:00
Brian Henry b4fc1737bc Remove functionless ABSPATH check.
Checking for ABSPATH is recommended so WordPress functions are not called before WordPress has been loaded. This does not apply to interfaces.
2021-06-02 23:39:48 -07:00
Roy Ho 0507f06508
Merge pull request #30012 from woocommerce/update/widgets-show-instance-in-rest-api
Widgets: show instance in Rest API
2021-06-02 07:37:59 -07:00
Claudio Sanches c81440f56e
Merge pull request #30010 from woocommerce/fix/29982-show-tracker-data-via-cli
Add a CLI command for dumping tracker data to terminal
2021-06-02 10:34:05 -03:00
Rua Haszard 414ba48ee2 switch to using a Formatter for more flexible output, improve docs 2021-06-02 15:49:25 +12:00
Rua Haszard afb59d060c
fill in @since version number for WC_CLI_Tracker_Command
Co-authored-by: Claudio Sanches <contato@claudiosanches.com>
2021-06-02 15:29:14 +12:00
Rua Haszard e0ff75f826
rename command to `snapshot` in `tracker` namespace
Co-authored-by: Claudio Sanches <contato@claudiosanches.com>
2021-06-02 15:28:16 +12:00
Claudio Sanches 94bdcd0320
Merge pull request #27684 from woocommerce/refactor/settings-pages-classes-take-2
Refactor the settings pages, and add unit tests for them
2021-06-01 13:19:49 -03:00
Albert Juhé Lluveras d01261e19a Allow block templates for WooCommerce pages 2021-05-31 12:57:47 +02:00
Michael P. Pfeiffer 3e36432d94 Widgets: show instance in Rest API 2021-05-31 12:20:57 +02:00
Rua Haszard bcadf9d264 add a CLI command for dumping tracker data to terminal 2021-05-31 14:55:29 +12:00
Nestor Soriano 9878aa37aa
Add unit tests for the Filterer class (simple products only for now)
Also fix a small issue in the product counters when using "or" filter.
2021-05-28 17:27:03 +02:00
Roy Ho 84f8fcd016
Merge pull request #29938 from geektzu/fix/29708
Fix for deleted Reduce or Zero rate tax classes
2021-05-28 07:11:33 -07:00
geektzu 394b6665f8 Move the comments as per code review 2021-05-28 10:26:31 +12:00
Claudio Sanches e745be1b42
Merge pull request #29783 from macr1408/trunk
Check for WP Error when uploading products placeholder
2021-05-26 19:28:43 -03:00
Claudio Sanches c9db54c784
Update includes/class-wc-install.php 2021-05-26 19:26:35 -03:00
Claudio Sanches 639623edb2
Update includes/class-wc-install.php 2021-05-26 19:26:02 -03:00
Claudio Sanches d29a2784b1
Merge pull request #29986 from mahdiyazdani/patch-4
Typo in `product_data_panels` method comment
2021-05-26 19:22:28 -03:00
Claudio Sanches 517b723c63 Set geolocation transients to expire in one day 2021-05-25 17:59:50 -03:00
Barry Hughes 71cdb3d752
Merge pull request #29848 from yehudah/fix/29840
Curaçao: remove postcode field, stop requiring the state field | #29840
2021-05-25 13:08:28 -07:00
Mahdi Yazdani e682a44878
Typo in `product_data_panels` method comment 2021-05-25 20:06:30 +03:00
Vedanshu Jain 48c6646365
Merge pull request #29941 from woocommerce/update/rename-products-widgets
Block Widgets: rename Products, Products by Rating and Recent Viewed Products widgets
2021-05-24 14:42:01 +05:30
James Allan 7f4f165cc0 Set the PayPal load flag on install 2021-05-24 16:04:01 +10:00
James Allan 3099f672cb No longer load PayPal Standard on new installs 2021-05-24 16:04:01 +10:00
Dale Phurrough 579c3be7f0
apply filter to errant hardcoded redirect
- fix for one of the specific errant hardcoded redirects in
  https://github.com/woocommerce/woocommerce/issues/25288
2021-05-23 15:17:57 +02:00
Claudio Sanches 02000dc8a3
Merge pull request #29945 from woocommerce/fix/29891
Calculate order total before applying a percentage fee
2021-05-21 17:46:15 -03:00
Christopher Allford 070954c888 Revert #28187
The default functionality within the `ThemeSupport` class has an unintended
side-effect of breaking the existing default functionality within the
`wc_get_theme_support()` function. Since the default set in the support
class is prioritized over the one given to `ThemeSupport::get_option()`,
the WordPress options set in the Customizer are never used for images.
2021-05-21 12:10:15 -07:00
Vedanshu Jain 6667233eb1
Merge pull request #29762 from woocommerce/fix/29502
Update restock logic during refunds closes #29502
2021-05-21 22:53:22 +05:30
geektzu 3ee412155b Fixed function signature and re-ran unit tests locally
Also stick to the commenting standard
2021-05-21 18:04:35 +12:00
Vedanshu Jain dd876b6d8a
Merge pull request #29835 from woocommerce/fix/29124-magic-arg
Test for the presence of 3 or more args (not 2 or more). | #29124
2021-05-20 22:13:38 +05:30
Michael P. Pfeiffer 41ff4e3b20 Rename Recent Viewed Products widget to Recently Viewed Products list 2021-05-20 11:35:39 +02:00
Roy Ho 02981cfbc9
Merge pull request #29772 from woocommerce/fix/navigation-block-preparation
Add labels and allow searching terms in WooCommerce Navigation Link block variations
2021-05-19 11:55:56 -07:00
Jonathan Sadowski ee2728dff3 Calculate order total before applying a percentage fee 2021-05-19 13:53:57 -05:00
Roy Ho 0643ccf4c6
Merge branch 'trunk' into add/woocommerce_inbox_variant 2021-05-19 10:36:21 -07:00
Michael P. Pfeiffer 6fa955baca Block Widgets: rename Products and Products by Rating widgets 2021-05-19 15:49:29 +02:00
Cale9 a0ef53dd71 Fix for deleted Reduce or Zero rate tax classes 2021-05-18 19:11:59 +12:00
Alfredo Sumaran 8fa6265ef7 Fix Code Sniffer error 2021-05-17 18:35:18 -05:00
Alfredo Sumaran f20e8ab567 Move variable declaration outside foreach loop 2021-05-17 18:27:17 -05:00
Alfredo Sumaran 79db2d95a0 Use default value only if form was displayed to the user
Also changed variable name for readability
2021-05-17 17:15:16 -05:00
Alfredo Sumaran 32566c508e Consolidate value for checkbox input types 2021-05-17 16:27:47 -05:00
Alfredo Sumaran c7bd680579 Consolidate value for checkbox input types 2021-05-17 16:27:47 -05:00
Alfredo Sumaran 195acd0866 Skip switch statement if value is empty 2021-05-17 16:27:47 -05:00
Alfredo Sumaran 5a5a808182 Update syntax to ignore line from PHP CodeSniffer 2021-05-17 16:27:47 -05:00
Alfredo Sumaran 90443914f0 Set checkout field value with defined default 2021-05-17 16:27:47 -05:00
Barry Hughes 31da9455a2
Merge pull request #29912 from woocommerce/fix/29484
Set header cache-control for cart/checkout pages closes #29484
2021-05-17 13:34:27 -07:00
roykho aa7e77a8ed
Remove comment that it includes checkout page 2021-05-17 12:50:38 -07:00
Claudio Sanches 313a89499e
Merge pull request #29781 from gilesholder/trunk
PayPal settings title - capitalisation fix for consistency
2021-05-17 15:17:56 -03:00
Claudio Sanches c35ed5e1a6
Merge pull request #29847 from codetot/fix/widget_products
Set loop prop to widget products to adapt condition on single product page
2021-05-17 12:40:05 -03:00
Christopher Allford 0b89a27abd Updated versions for 5.5.0 development 2021-05-14 15:03:39 -07:00
Christopher Allford 657d84ae3e
Revert "Fix filter woocommerce_shipping_rate_cost backwards compatibility" 2021-05-14 14:08:30 -07:00
Claudio Sanches 5493218870
Merge pull request #29717 from kkmuffme/patch-1
Sort country codes alphabetically
2021-05-14 17:31:40 -03:00
roykho 9f6104598b
Set header cache-control for cart/checkout pages closes #29484 2021-05-14 12:06:07 -07:00
Jonathan Sadowski 661aa38b6b REST API: Update date_query usage in CRUS controller to be consistent, and generate an array of queries 2021-05-14 13:26:30 -05:00
Nestor Soriano e085898fc4
Use the product attributes lookup table for the filter by attribute widget when enabled. 2021-05-14 17:04:25 +02:00
Christopher Allford dcec089e7e Merge branch 'trunk' into wc-admin-nonce 2021-05-13 14:11:32 -07:00
Claudio Sanches 886abe282d Allows set downloadable permissions to any downloadable product in any order 2021-05-13 13:50:04 -03:00
Vedanshu Jain 90b50f11f3
Merge pull request #29843 from woocommerce/add/wc-pay-ad-banner
Add support for WooCommerce Payments ad banner on extensions screen's "Featured" section
2021-05-13 16:56:55 +05:30
Nestor Soriano 32cce6032d
Add Filterer class and use it when filtering by attributes lookup table usage is enabled. 2021-05-13 12:29:23 +02:00
Nestor Soriano 22b5ec121f
Fix: no output for settings classes that directly override get_settings. 2021-05-13 09:24:25 +02:00
Paul Sealock 08d71b5a0c make assignment 1-12 2021-05-13 17:58:09 +12:00
Paul Sealock cc244ce103 remove activation hook as its redundant 2021-05-13 12:59:19 +12:00
Paul Sealock 1314e7e142 Add woocommerce_inbox_variant: 2021-05-13 12:55:58 +12:00
jonathansadowski 692ddaf4f2
Merge pull request #29318 from woocommerce/fix/rounding
Make rounding more accurate when prices are entered more than 2dp
2021-05-12 17:43:29 -05:00
Roy Ho 4d6559e957
Merge pull request #29877 from woocommerce/tracker_sql_query
Move Tracker to use direct sql queries
2021-05-12 14:53:49 -07:00
Dan Wyman 721fee7064 Add periods to comments. 2021-05-12 14:23:07 -07:00
And Finally 7202f19631 Added support for `geoblacklist` in `output_promotion_block`. 2021-05-12 17:54:20 +01:00
And Finally 6bb1ec73a4 Reverted renaming of `geowhitelist` and `geoblacklist`, in case they are still present in other endpoints. 2021-05-12 17:48:37 +01:00
And Finally de331ad893 Addressing feedback. Removed `!important` from `.addons-button-expandable` rule. Renamed `geowhitelist` and `geoblacklist` to `geo_allow_list` and `geo_block_list`. 2021-05-12 09:41:31 +01:00
Néstor Soriano d2da61ac53
Merge pull request #28132 from TimBHowe/update/fix-28111 2021-05-12 08:42:34 +02:00
Menaka S e20223f63e Make the restored function private 2021-05-12 06:48:36 +05:30
Menaka S ffd6bd4163 Make the new function private 2021-05-12 06:43:36 +05:30
Dan Wyman d13ce85b66 Set default value for variable 2021-05-12 06:40:53 +05:30
Menaka S 5dfac89d80 Add function to get order details by gateway 2021-05-12 06:40:53 +05:30
Menaka S 20b39bedac Restore direct SQL queries and functions from WC 5.0 2021-05-12 06:40:53 +05:30
Claudio Sanches c520505dbe
Merge pull request #29809 from kapilpaul/fix/coding-style-in-class-wc-email
fix: coding style in class-wc-email.php
2021-05-11 18:02:39 -03:00
Claudio Sanches af809c70cb
Merge pull request #28335 from OlegApanovich/fix/28008
Fix filter woocommerce_shipping_rate_cost backwards compatibility
2021-05-11 13:34:19 -03:00
roykho 006f580b28
Remove unneeded order_version 2021-05-11 08:54:35 -07:00
roykho b808d9a24f
Fix merge conflicts 2021-05-11 08:53:03 -07:00
roykho 8c3e90b3ce
Initialize _restock_refunded_items meta on order update 2021-05-11 08:35:48 -07:00
Christopher Allford fd624f77c8
Merge pull request #29044 from woocommerce/fix/issue-28284
Fix/issue 28284
2021-05-10 11:38:20 -07:00
Roy Ho f9441dcc00
Merge pull request #29778 from woocommerce/add/29608
Product attributes lookup table creation and filling
2021-05-10 07:41:39 -07:00
Nestor Soriano 78ab6fe079
Fix syntax error after manual merge conglict resolution 2021-05-07 12:26:18 +02:00
Nestor Soriano 8b12fee96f
Merge branch 'trunk' into refactor/settings-pages-classes-take-2 2021-05-07 12:16:13 +02:00
vedanshujain b487e363ce Restore formatting but without rounding for backward compat. 2021-05-07 14:58:52 +05:30
vedanshujain 18411d2b3b Add code comments for confusing changes. 2021-05-07 14:30:45 +05:30
vedanshujain 833193b7f7 Round tax amount appropriately before displaying.
We have special method to round taxes which may round up or round down depending upon settings. This method should be used instead of default rounding in formatting funtions.
2021-05-07 14:30:45 +05:30
vedanshujain a0d6cea139 Round shipping and fees tax seperately since they are entered excl taxes.
We round up or round down depending upon if prices are entered inclusive or exclusive taxes, however since shipping and fees are always entered exclusive of taxes, they should always be rounded down.
2021-05-07 14:30:44 +05:30
vedanshujain 30cbf4638d Use constant instead of magic numbers. 2021-05-07 14:30:44 +05:30
vedanshujain b156e329f8 Remove rounding from lines which are not final totals. 2021-05-07 14:30:44 +05:30
vedanshujain 973bba347f Remove rounding from subtotals as they would already be rounded depending upon settings. 2021-05-07 14:30:44 +05:30
vedanshujain 43822b7401 Remove rounding from individual item discount taxes.
Rounding here conflicts with round at subtotal settings becase we would round at line item level irrespective of settings.
2021-05-07 14:30:44 +05:30
And Finally e4d3b157ff Changed block name and CSS classnames to the more generic "promotion block". 2021-05-06 22:12:07 +01:00
Tim Howe f179ff6741 Added dates_are_gmt parameter to allow the uses of post_date_gmt column with the before and after parameters for the order RESTAPI 2021-05-06 17:06:06 -04:00
Yehuda Hassine ab6404f6f1 Remove Curaçao postcode 2021-05-06 23:02:18 +03:00
Khoi Nguyen aa913b59ed Set loop prop to widget products to set condition on single product page 2021-05-06 22:22:58 +07:00
TimBHowe 98af7209da Added the 'after_gmt' and 'before_gm' parameters 2021-05-06 10:58:27 -04:00
And Finally 21b4801cc1 Fixing doc comment for new method. 2021-05-06 15:40:02 +01:00
And Finally 2b053d4586 Added docblock comment for `$section` param. 2021-05-06 15:22:53 +01:00
And Finally f1a69cb4af Added comment to new `output_ad_block` method. Removed differences introduced by PhpStorm autoformat. 2021-05-06 15:16:49 +01:00
And Finally 3fa233872c Added `output_ad_block` method to `WC_Admin_Addons` and CSS rules to render a WooCommerce Payments ad banner at the top of the "Featured" section of the WC Core addons page, `wp-admin/admin.php?page=wc-addons&section=_featured`. This is to fulfil the requirements of WooCommerce.com issue https://github.com/Automattic/woocommerce.com/issues/9860.
We output the block if

- The user has permissions to install plugins.
- Their location is in one of the countries identified in a `geowhitelist`.
- WooCommerce Payments is not already active.
2021-05-06 12:55:30 +01:00
barryhughes 7ea5c7501f Test for the presence of 3 or more args (not 2 or more). | #29124 2021-05-05 11:43:14 -07:00
Nestor Soriano f53f959d03
Fix the usage of FakeQueue in DataRegeneratorTest.
Also update the doc comment of FakeQueue itself on how to use it.
2021-05-05 11:11:36 +02:00
Nestor Soriano 6820b6e519
Add the WC_Queue::reset_instance method 2021-05-04 16:13:48 +02:00
Kapil Paul 4ae714de56 fix: coding-style-in-class-wc-email.php 2021-05-02 00:52:38 +06:00
roykho ccef7c46a3
Restore testing version 2021-04-29 07:25:26 -07:00
roykho 87047c77df
Limit the new refund restock logic to order version 5.4+ 2021-04-29 06:30:53 -07:00
Nestor Soriano 7f2c2d8b72
Add logging for errors during the execution of a debug tool. 2021-04-29 11:20:25 +02:00
Jonathan Sadowski 98b4968ec2 Address code sniff issues 2021-04-28 16:26:32 -05:00
roykho 6c804e31d7 Update deprecated hovers 2021-04-28 16:22:00 -05:00
roykho 387e095a01 Update deprecated jQuery functions in includes folder 2021-04-28 16:21:59 -05:00
Marcos 971f41a89e
Check for WP Error when uploading placeholder 2021-04-28 14:04:47 -03:00
roykho 6432e06e7d
Update value of to take refunded item quantity when is not set 2021-04-28 07:28:47 -07:00
gilesholder 44493149d5
Update settings-paypal.php
Makes IPN notification title consistent with the other titles (no capital letter starts on new words)
2021-04-28 12:36:45 +01:00
Bero 1d232ddd1f Merge branch 'trunk' into update/extensions-search-all-categories 2021-04-28 11:06:24 +02:00
Nestor Soriano d1744ac99a
Add the ProductAttributesLookup\DataRegenerator class.
This class creates and fills the product attributes lookup table
from the existing products. It does so by in small chunks by using
Action Scheduler; it handles all the batches and the scheduling
by itself.

It also adds two entries to the debug tools menu:

- Initiate lookup table regeneration (deleting the existing table first)
- Enable or disable the actual usage of the lookup table
  for product filtering

The first one is the only way to generate the lookup table for now
(there's no explicit data migration).

The actual filling of the table is delegated to a LookupDataStore class
that is not implemented yet, so for now the table isn't actually filled.
Also enabling/disabling the lookup table usage has no real effect yet.
2021-04-28 10:30:11 +02:00
Nestor Soriano 10adec6b88
Improvements in the engine behind the debug tools page.
Two new optional keys have been added to the tool definition array:

- 'disabled': when true the tool button will appear disabled.
- 'needs_refresh': when running a tool, by default the tool definitions
  are retrieved first, then the selected tool is executed,
  then the definitions previously retrieved are rendered.
  When this key is true the tool definitions are retrieved again
  after execution, useful for cases where the tool description
  or button enable/disable state changes after the tool execution.

Also now if a tool execution throws an exception a notice will be
shown with the execption message, previously the exception
was unhandled.
2021-04-28 10:24:23 +02:00
Nestor Soriano bad3df3e23
Fix code sniffer errors 2021-04-28 09:36:10 +02:00
barryhughes 2a70009c89 Merge branch 'trunk' into fix/27317-selectwoo-a11y 2021-04-27 13:23:56 -07:00
roykho 980fe7c759
Add to the restock_refunded_items count instead of replacting 2021-04-27 07:22:28 -07:00
Albert Juhé Lluveras 9ae0b52afd Allow Product Categories and Products Tags to be shown in REST
This way, they can be searched when adding the Product Category Link
and Product Tag Link blocks.
2021-04-27 15:10:01 +02:00
Albert Juhé Lluveras 5ab690e2a0 Add item_link and item_link_description labels to Products, Categories and Tags 2021-04-27 15:09:33 +02:00
roykho d571e570e4
Remove set_backorders logic from external products closes #29696 2021-04-26 08:18:09 -07:00
roykho 7105a7a17e
Update restock logic during refunds closes #29502 2021-04-23 12:14:51 -07:00
Jonathan Sadowski 55ab8cb966 Set USD as default store currency 2021-04-23 09:29:12 -05:00
Ovidiu Liuta f01c4a288c
fixing phpcs comment 2021-04-23 14:22:50 +03:00
Ovidiu Liuta b23f117d84
coding style fixes 2021-04-23 12:34:23 +03:00
Ovidiu Liuta f715e2a72f
Update abstract-wc-csv-batch-exporter.php 2021-04-23 12:23:18 +03:00
Ovidiu Liuta 1e6dd0acce
Fixing batch export limitations
This commit will fix the batch export issues related to distributed file systems and memory limitations.

Basically, instead of pretending the headers at the last step of the export and loading the full CSV content into memory each time data needs to be added, we basically will append the data to the created file on each batch request; and at the last step, we will also create a temporary file to store the CSV headers, so when preparing the download to the user, this will simply read the CSV headers from the created temporary file.
2021-04-23 12:20:45 +03:00
Roy Ho 03d4d4893e
Merge pull request #28187 from woocommerce/fix/25900-take-2
Fix: image size customisation controls not shown when theme doesn't define them but Woo core does
2021-04-22 05:41:57 -07:00
Nestor Soriano 3a895c9eed
Move ThemeSupport class to Internal namespace, and use in 2021 theme. 2021-04-21 12:57:56 +02:00
vedanshujain 96f1ccfe61 Use encoding instead of direct quote character to follow WP guideline. 2021-04-21 11:29:25 +05:30
vedanshujain 00a0118858 Improvements in text for translators. 2021-04-21 11:29:25 +05:30
Gracie Ofslager 43a502e185 Update class-wc-settings-emails.php
Adding copy to line 54 for instructions on how to ensure email is delivered successfully and linking to troubleshooting documentation.
2021-04-21 11:29:25 +05:30
Roy Ho e4fec5b914
Merge pull request #29721 from woocommerce/fix/29525
Modify wc_get_low_stock_amount function to always return a number
2021-04-20 11:56:27 -07:00
Nestor Soriano d214eab157
Use int cast instead of intval in wc_get_low_stock_amount 2021-04-20 16:35:42 +02:00
Nestor Soriano d11a20b5b4
Merge branch 'trunk' into fix/25900-take-2 2021-04-20 16:08:45 +02:00