Commit Graph

515 Commits

Author SHA1 Message Date
roykho 5d0bcfa053
Revise logic to hook into admin_init to trigger adding note instead of scheduling 2021-07-06 09:21:42 -07:00
roykho ade4478912
Add WC Admin inbox note when page is created 2021-06-30 13:03:47 -07: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
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
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
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
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 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
James Allan 7f4f165cc0 Set the PayPal load flag on install 2021-05-24 16:04:01 +10:00
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
Cale9 a0ef53dd71 Fix for deleted Reduce or Zero rate tax classes 2021-05-18 19:11:59 +12:00
Marcos 971f41a89e
Check for WP Error when uploading placeholder 2021-04-28 14:04:47 -03:00
Nestor Soriano cf9300bbbc
Refactor in the WC_Settings_Page class for PHP 8 compatibility
- Turn get_settings into a parameterless method, but accept one
  parameter via func_get_arg; and mark the method as deprecated.
- Rename the existing get_settings to get_settings_for_section;
  and mark the method as final.
- Rename the existing get_settings_for_section to get_settings_for_section_core.

See the comment added to get_settings for the rationale for the change.
2021-04-13 12:45:42 +02:00
Nestor Soriano 56cc063d7f
Rename "get_settings" to "get_settings_for_section" in settings pages.
In PHP 8 overriding a method having an optional parameter with a
method having no parameters throws an error, thus we can't use
the strategy of changing "get_settings()" to "get_settings($section='')"
without breaking existing extensions. So we do the following instead:

- Rename the existing "get_settings" to "get_settings_for_section"
- Rename the existing "get_settings_for_section" to "get_settings_for_section_core"
- Add a "get_settings" that just does "get_settings_for_section('')"
  for compatibility, but mark it as deprecated.
2021-04-12 18:04:41 +02:00
jonathansadowski e5a3ac48aa
Merge pull request #28933 from Mindsize/wc-24581-holding-stock-minutes
Wc 24581 holding stock minutes
2021-02-03 16:05:18 -06:00
mfs-mindsize 1398219b95 adjusted new filter's default to option value + added absint 2021-02-01 14:15:41 -05:00
vedanshujain 2e4f2ef478 Add migration function for fixing existing product review counts. 2021-01-14 18:35:14 +05:30
mfs-mindsize cd725af6e2 also added filter: woocommerce_cancel_unpaid_orders_interval_minutes to wc install process 2020-12-17 11:44:53 -05:00
Gary Cao e6a7f0f40a
Fix Unknown named parameter error on PHP 8 2020-12-10 15:21:34 +09:00
Roy Ho 593cd0ea5d
Merge pull request #27675 from woocommerce/fix/update-premium-support-link-href
Update href of premium support link
2020-12-08 13:46:44 -08:00
Claudio Sanches e34681dbb4
Merge pull request #27696 from woocommerce/fix/version-race-conditions
Fix some race conditions in WC_Install
2020-10-14 20:18:47 -03:00
Néstor Soriano e4b78cedbf
Merge pull request #27748 from woocommerce/remove-leftovers-from-improved-filtering-by-attribute-for-variations
Remove leftovers from the reverted improved filtering mechanism for variations
2020-10-08 15:45:09 +02:00
Jonathan Sadowski e540b4820e Rename maybe_enable_setup_wizard to maybe_set_activation_transients 2020-09-30 17:27:43 -05:00
Jonathan Sadowski 83238ec1d7 Move maybe_enable_setup_wizard abode update_wc_version so new install is detected 2020-09-30 17:01:43 -05:00
Jonathan Sadowski 95755cb59d Update the activation transient to only get added on new installs 2020-09-30 16:00:45 -05:00
Joshua Flowers 048c43a37f Add back in activation transient to redirect on install 2020-09-29 14:25:15 -04:00
Nestor Soriano f419335cdf Remove the migration to delete variation term relationships. 2020-09-28 09:35:13 +02:00
Nestor Soriano 849a64d67c Add a data migration for removing term relationships related to variations
After the code that creates term relationships for variations has been
removed, a data migration is required to remove all the no longer needed
term relationships.

Also, the original migration that backfilled those relationships has
been removed (the migration function is kept but with an empty body).
2020-09-22 16:31:38 +02:00
Rodrigo Primo 7401982d37
Merge pull request #27047 from woocommerce/fix/26972
Removed Features settings and home screen option
2020-09-18 16:46:43 -03:00
Rodrigo Primo f3191907d9 Add missing line break 2020-09-18 14:25:25 -03:00
Ron Rennick cca97599d7 only automatically create pages on new install 2020-09-18 13:10:11 -03:00
Ron Rennick 9915a5b142 merge master 2020-09-18 12:53:28 -03:00
Konstantin Kovshenin a100ed67b2 Fix race conditions in WC_Install
In an environment with persistent object caching, concurrent calls
to delete_option() + add_option() can result in the option value
leaking out of the alloptions cache key, and into its own cache
item under the options group, while deleting the value from the
database.

This causes future function calls to add_option() to fail, since
the value already exists in cache (under the wrong key). It also
causes calls to delete_option() to fail, since the value is not
in the database.

This commit forces update_option() instead of the delete + add
combination, as well as removes multiple unnecessary calls to
update the woocommerce_db_version from admin notes and notices.
2020-09-17 11:59:50 +03:00
And Finally fc908a0bef Change href of premium support link from `https://woocommerce.com/my-account/tickets/` to `https://woocommerce.com/my-account/create-a-ticket/`, as the original URL is deprecated. 2020-09-15 10:55:52 +01:00
Ron Rennick d998c6334d
Merge pull request #26976 from JoryHogeveen/patch-1
Public access to WC_Install::get_core_capabilities()
2020-08-28 15:12:51 -03:00
Ron Rennick 8fe3bcb90e rebase to current master 2020-08-28 10:59:43 -03:00
Jonathan Sadowski 6bafef2041 Foreign key check 2020-08-18 13:44:29 -05:00
Ron Rennick 3c8b6559da create pages on installation 2020-08-13 15:03:58 -03:00
Claudio Sanches 02cf0dfaed
Merge pull request #27239 from woocommerce/fix/package-tag
Fix usage of "package" tag in file headers
2020-08-07 13:37:24 -03:00
Claudio Sanches d48f1d4e2e Fixed package tag usage 2020-08-05 13:36:24 -03:00
Andy Skelton b554eea43c
Whitespace 2020-08-04 10:47:59 -05:00
Claudio Sanches 0b45369bff Improved migration script to avoid race condition 2020-07-30 16:17:23 -03:00
Claudio Sanches 5b48191eac Batch update coupons 2020-07-29 23:07:00 -03:00
Claudio Sanches 119b5d6568
Merge branch 'master' into fix/23790 2020-07-28 13:07:17 -03:00
Néstor Soriano e9d692f455 Apply suggestions from code review
Mostly adding "since 4.4.0" annotations and updating
db update functions from 4.2 to 4.4.

Co-authored-by: Claudio Sanches <contato@claudiosanches.com>
2020-07-28 09:01:55 +02:00
Nestor Soriano 9c6c0d73d8 Record attribute terms for product variations in wp_term_relationships.
Product attributes are currently recorded as terms in
wp_term_relationships (product attributes are actually taxonomies).
In the case of variable products this is true for the main product,
but not for the variations. The attributes used to define variations
are stored as post meta, but nothing is recorded in the term
relationships table.

This is a problem when using the layered nav filtering plugin,
since the attribute counters displayed are calculated based solely
on the contents of the term relationships table. Adding meta queries
would be really messy (especially when the widget is configured
with AND operator) and would probably also hurt performance.

This commit adds a change to store the attributes for variations
as term relationships, additionally to storing them as post meta.
Terms are stored on variation creation, and updated/deleted together
with the variation as appropriate. "Any" variations (stored in meta
as empty values) are not stored as terms.

Additionally, a database upgrade is included in order to backfill
terms for already existing products.
2020-07-28 08:55:55 +02:00