Commit Graph

21552 Commits

Author SHA1 Message Date
barryhughes dc3589f0e3 Revert f88586e but add supporting logging. 2021-07-20 11:18:22 -07:00
Roy Ho 1947c80c21
Merge pull request #30305 from shyam-mishra/fix/30198
fixed by putting strip all tag
2021-07-20 15:54:09 +01:00
jonathansadowski dc3b3dc662
Merge pull request #30301 from woocommerce/fix/30290
Use WC Version for loading scripts instead of hardcoding them closes …
2021-07-20 09:09:51 -05:00
roykho d9a329e0cc
Update to use our own custom versioning 2021-07-20 05:59:35 -07:00
Roy Ho 0a857088f9
Merge pull request #30287 from woocommerce/fix/29723
Fix: "search product" block not displaying textbox in shop page
2021-07-19 16:17:49 +01:00
Nestor Soriano bc7f9edb11
Fix product search block not actually working. 2021-07-19 16:51:13 +02:00
Nestor Soriano 88e8ea5dc2
Replace the 'wp_kses_allowed_html' hooking with a call to
'wp_kses_allowed_html' and a call to 'wp_kses'.
2021-07-19 15:10:33 +02:00
shyam-mishra 90fccabafa fixed by putting strip all tag 2021-07-18 17:29:33 +05:30
Jonathan Sadowski 91c55b54c0 Update prepared query to use single-quote instead of double-quotes 2021-07-16 15:00:02 -05:00
Jonathan Sadowski db44d15e3f Apply patch to class-wc-webhook-data-store.php to fix sqli issue 2021-07-16 14:59:02 -05:00
roykho 740cd388dc
Use WC Version for loading scripts instead of hardcoding them closes #30290 2021-07-16 11:42:12 -07:00
Roy Ho 95abba7eeb
Merge pull request #30041 from woocommerce/add/29609
Sync the product attributes lookup table on product creation/change/deletion
2021-07-16 15:03:54 +01:00
Nestor Soriano d3bfd33e98
Use 'esc_attr' instead of suppressing the PHPCS warning 2021-07-16 09:16:20 +02:00
Barry Hughes 97a397dba6
Merge pull request #30278 from woocommerce/fix/29969
Use single quotes to delineate mysql values instead of double quotes.
2021-07-15 14:44:00 -07:00
Nestor Soriano c5ca35c911
Fix: "search product" block not displaying textbox in shop page
The "seach block" product doesn't display the textbox because its
HTML is filtered out by `wp_kses_post`. This fix hooks on
'wp_kses_allowed_html' in order to explicitly allow the HTML elements
of the block in the shop page.
2021-07-15 14:39:39 +02:00
Mahmoud Saeed 7cdf8d46f6 Fix fatal error if $screen is null 2021-07-14 17:51:44 +02:00
roykho aa939f6081
Use single quotes to delineate mysql values instead of double quotes closes #29969 2021-07-14 08:45:01 -07:00
Nestor Soriano 9017c953bd
Remove the metabox for regenerating attribute lookup data for single product
Instead, a product selector has been added to the "Regenerate
product attributes lookup table" entry in the tools page. If a product
is selected, the tool regenerates the data only for that product;
otherwise, it regenerates the entire table.

This has forced a change on how the tools page is rendered. Now,
instead of each tool being just a description and a trigger link,
a form with GET method is rendered for each tool. The forms are rendered
first and then the tools, since HTML doesn't allow to include forms
inside tables; each button is associated to its form with a "form"
attribute.

Additionally, now the tools array returned by the woocommerce_debug_tools`
hook can have a 'selector' array with the details needed to render a
selector, which will also be part of the form for the tool.
2021-07-14 12:01:42 +02:00
Yordan Soares ae4040368c Fix the payment method title for the option "Other"
Closes: #30255
2021-07-11 23:38:53 -04:00
Matej Kravjar f3dd7be2b0 fix incorrect modification time in logs dropdown 2021-07-11 10:33:08 +02:00
Alexandre Faustino 31ac6db10f New hook for product external options 2021-07-07 10:41:40 +01:00
Néstor Soriano 6cc150e7be
Merge pull request #30194 from woocommerce/fix/29235
Fix/29235
2021-07-07 10:56:17 +02:00
jonathansadowski 6e208c9336
Merge pull request #29901 from woocommerce/fix/29884
Allows set downloadable permissions to any downloadable product in any order
2021-07-06 15:10:09 -05:00
roykho 5d0bcfa053
Revise logic to hook into admin_init to trigger adding note instead of scheduling 2021-07-06 09:21:42 -07:00
Barry Hughes 2cce7f3af8
Merge pull request #30199 from RhnSharma/revise-docblock-wc-format-decimal
Revise docblock for wc_format_decimal()
2021-07-02 07:50:56 -07:00
Varun Varada e38be6df10 Correct postal code labels for US & India
Fixes #30203
2021-07-02 00:13:41 -05:00
Rohan Sharma 5087e00f17 task: revise docblock for wc_format_decimal() 2021-07-01 17:41:33 +05:30
Fitim Vata 482d019304 Change schema description for api_restock 2021-07-01 06:42:35 +02:00
roykho d9773ee0e4
Fix typo 2021-06-30 21:02:15 -07:00
roykho 5bfee13c44
Remove trailing comma 2021-06-30 20:23:55 -07:00
roykho ade4478912
Add WC Admin inbox note when page is created 2021-06-30 13:03:47 -07:00
Fitim Vata 3e17c0b618 [Rest] Refunds add api_restock param to restock items 2021-06-30 00:19:23 +02:00
roykho 946aeb8d15
Update create_pages function to support post_status 2021-06-29 13:51:35 -07:00
roykho be53a0283e
Create the refund and returns policy page on a DB update routine 2021-06-29 12:18:01 -07:00
roykho 4585c7ef7f
Add refund and return page for creation 2021-06-29 10:06:21 -07:00
Barry Hughes 74dfa0d825
Merge pull request #30165 from woocommerce/fix/29768
Remove potential for type (and division-by-zero) errors when determining thumbnail sizes.
2021-06-29 07:34:33 -07:00
roykho edd5463691
Simplied fix per comment 2021-06-29 06:41:16 -07:00
Denis Dvali 030680ed7f
Cast default status to integer on payment token update 2021-06-29 14:50:57 +03:00
Vedanshu Jain 89aac04387
Merge pull request #30138 from woocommerce/fix/30136-no-block-templates-for-products
Exclude block templates from showing up in product edit page
2021-06-29 17:12:17 +05:30
Michael P. Pfeiffer a65f31e2de Return early if gutenberg_get_block_template function does not exist 2021-06-29 13:10:45 +02:00
Claudio Sanches 13e88d5bb3
Merge pull request #29967 from diablodale/fix25288-partial
apply filter to errant hardcoded redirect on logout for custom endpoint
2021-06-28 17:25:05 -03:00
Néstor Soriano 1f1f331432
Merge pull request #30081 from woocommerce/frosso/wcs-extensions-bannes-updates
chore: copy changes on WCS banner
2021-06-28 16:52:44 +02:00
roykho c56f4dea20
Revert this change for a different PR 2021-06-25 14:08:06 -07:00
roykho 1b8acc567b
Cast values when performing math operations to prevent PHP 8 fatal errors 2021-06-25 13:31:59 -07:00
roykho bb2664d56a
Use a helper divider method to account for strings and zeros when dividing closes #29768 2021-06-25 13:30:04 -07:00
Vedanshu Jain de9a0b176b
Merge pull request #30082 from woocommerce/frosso/remove-canada-post-extension-banner
chore: remove WCS canada post mentions
2021-06-25 15:38:29 +05:30
Néstor Soriano 761108ccce
Merge pull request #29749 from ovidiul/vip/fix_batch_export
Fixing batch export limitations
2021-06-25 09:34:23 +02:00
Néstor Soriano 21f7f97079
Merge pull request #30123 from woocommerce/add/24641
Introduces a new hook after an email is sent
2021-06-24 09:15:18 +02:00
Claudio Sanches 5128a45936
Apply suggestions from code review 2021-06-22 15:37:18 -03:00
vedanshujain 02f7a86db0 Specify default sort order for webhok DS. 2021-06-22 12:28:44 +05:30
vedanshujain 93fe370966 Update version to prep for 5.6 2021-06-22 12:28:20 +05:30
vedanshujain f88586eb1f Remove download headers when file was not served. 2021-06-22 12:24:47 +05:30
Albert Juhé Lluveras ebee0e157e Exclude block templates from showing up in product edit page 2021-06-21 20:41:48 +02:00
Claudio Sanches 88af805f31 Introduces woocommerce_email_sent hook 2021-06-18 11:14:11 -03:00
Barry Hughes 77127f93af
Merge pull request #30124 from woocommerce/Remove-ABSPATH-check-on-WC_Logger_Interface
Remove abspath check on wc logger interface
2021-06-17 09:47:50 -07:00
Claudio Sanches a19b2a34cf Introduces a new hook after an email is sent
Closes #24641
2021-06-17 12:36:25 -03:00
Claudio Sanches 9f8d3e84dc
Merge pull request #29970 from woocommerce/fix/29686
Include download IDs in csv import/export to retain import download permissions.
2021-06-17 12:11:20 -03:00
Vedanshu Jain 39c057f636
Merge pull request #29971 from woocommerce/hide-pypl-on-new-sites
Hide PayPal Standard on new installs
2021-06-17 19:40:53 +05:30
Nestor Soriano 48c44a6128
Add tests for product deletion in LookupDataStoreTest. 2021-06-17 15:31:23 +02:00
vedanshujain 381626069e Load PayPal gateway directly to prevent potential gateway errors.
`install()` method may be called before wc_version is set, this may cause unknown errors in 3PD gateways.

So its safer to only load PayPal gateway directly.
2021-06-17 14:32:21 +05:30
roykho f9e59fc9a9
At cancelled status for bulk actions closes #29928 2021-06-16 11:53:09 -07:00
Jonathan Sadowski c67fda9552 Update importer to grab downloads id from export file when updating rows 2021-06-15 10:06:37 -05:00
Jonathan Sadowski 84eaa48511 Update exporter to include download IDs for possible retention on import 2021-06-15 10:06:37 -05:00
Nestor Soriano 0192ed0b93
Change LookupDataStore to allow updates being done in a scheduled action.
There's a new option, 'woocommerce_attribute_lookup__direct_updates'.
When set to 'yes', updates to the lookup table are performed as soon
as the change happen; otherwise, a scheduled action will do it,
the hook name is 'woocommerce_run_product_attribute_lookup_update_callback'
(the existing hook in the DataRegenerator class is renamed to
'woocommerce_run_product_attribute_lookup_update_callback')

Also, the settings page has a new "Advanced" section with a checkbox
to control the value of that new option; the section is visible only
when the feature has been enabled via LookupDataStore::show_feature.
2021-06-15 16:33:29 +02:00
Mike Jolley 513b14dc9b Fix map url and other phone tests 2021-06-15 14:09:07 +01:00
Albert Juhé Lluveras ee08d2d110 Register woocommerce.css so it can be enqueued in the editor 2021-06-14 08:32:26 +02:00
frosso d6724ad67d chore: remove WCS canada post mentions 2021-06-10 13:07:24 -05:00
frosso e445918c8e chore: copy changes on WCS banner 2021-06-10 12:29:32 -05:00
Nestor Soriano 13ed3b80e0
Merge branch 'trunk' into add/29609 2021-06-10 12:35:34 +02:00
Michael P. Pfeiffer 19cd1e6ee6 Remove P2 reference 2021-06-09 14:14:21 +02:00
Michael P. Pfeiffer a54ccf01b4 FSE: add link to Customizer WooCommerce panel in block-based themes 2021-06-09 14:14:21 +02:00
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