* Add help tip to Product galery meta box
* Changelog
* Remove admin_post_thumbnail_html filter from product screen
* Add jQuery to append a tooltip after 'Set product image'
* Add dynamic upload size
* Add guard in case setPostThumbnail doesn't exist
Refactor jQuery code for simplicity
* Run phpcbf
* Fix php linting
* Run lint again
* Make both tooltips with jQuery
Refactor DOM manipulation code
Remove PHP implementation
* Change span tabIndex to 0 to allow focus on screen readers
* Move code to meta-boxes-product
* Add descriptive comment on jQuery code that adds tooltips
* Add @babel/plugin-proposal-class-properties to run storybook
* Add @babel/plugin-proposal-class-properties to webpack config and remove storybook env from babel config
* Add changelog
* Update plugin activation check
This is refactored to test the plugin state instead of checking the API call result.
This is because WordPress can return an error despite the plugin activating correctly. The `unexpected_output` error, in one such case, when WordPress detects stray output upon activation. To workaround this, the plugin is checked for its active status directly.
* Add tests
* Add changelog
* Fix lint issues
* Extract new component 'ProductForm', to reduce duplicated code between add-product-page and edit-product-page
* Add changelog
* Try to merge add-product-page and edit-product-page into a single product-page: running into some issues probably with the controller
* Revert "Try to merge add-product-page and edit-product-page into a single product-page: running into some issues probably with the controller"
This reverts commit bc30b67ef2.
* Fix REST API orders query when HPOS is used
The query wasn't working properly when 'search' or 'parent'
query string arguments were used and HPOS was enabled.
* Add changelog file
* PHPCS fixes.
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
* Add ability to show CES modal through share Feedback button
* Make use of showCesModal in footer
* Update CES action for share feedback
* Update changes to support second CES question
* Add changelog
* Address some PR feedback
* Add product mvp ces footer
* Add changelog
* Reset action option name after CES action
* Make sure we make use of cesAction
* Add close button
* Fix formatting
* Fix css styling issues
* Add icon to success notice
* Add product mvp CES hook and modify logic a little bit
* Update the CES product action name
* Address PR feedback and fix styling for smaller screens
* Add second question to CES product footer and update options
* Add changelog
* Fix lint error
* Fix tests
Even if these are set to the same value (and so the quantity cannot be changed--which results in a readonly quantity selector) we must output them for compatibility with code (example: Composite Products) that expects them to always be present.
* Update wc-account-functions.php
Correct order of single/plural translation strings to prevent confusion with translations and translators.
* Changelog.
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
* Fix Protected Directory Admin Notice
- make notice actually close when clicking "Dismiss"
- make unprotected directory detection smarter: not every /woocommerce_uploads/ page with content is a directory listing
* Unwind the change made to method `is_uploads_directory_protected()`.
Discussion here https://github.com/woocommerce/woocommerce/pull/33544/files#r910253861 relates. In essence, we felt it better to have more warnings prompting the user to evaluate if the directory is protected, than fewer warnings with an increased change of not flagging actual problems.
* Add changelog.
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
* Add updated versions of sr-only and not-sr-only mixins
* Improve element stacking in modals on tablet and mobile
* Add comment suggestion
* Change sr-only for screen-reader-only which is more descriptive
* Record an event 'product_view_product_click' when the 'View Product' link is clicked after creating or updating a product
* Add product_view_product_dismiss tracks events (WIP, not currently working)
* Add changelog
* Fix whitespace in addEventListener and remove console.logs
* Change link tag id to be more specific and comply with CSS guidelines
Move HTML code out of translation function
* Run phpcs in class-wc-admin-post-types
* Add tinyMCE types to add global tinymce variable in typescript code
* Add additional data in getProductData
TODO: I'm not sure if it's possible, or if it makes sense, to include stock_quantity_update in the object
* Add code review suggestions, including:
* Create isElementVisible function to backfill jQuery implementation
* Fix wrong value for is_downloadable, is_virtual, manage_stock
* Fix wrong radix
* Update menu_order implementation
* Add missing ? to weight
* Add stock_quantity_update implementation which is not working as intended
Since the page reloads after product update, the initialStockValue is updated as well
* Remove stock_quantity_update property and adjust is_downloadable, is_virtual, and manage_stock for consistency
* Currency symbol is fixed on the left side of the price input field
* Currency symbol has a different color from the input field value (Gutenberg-700)
* Input value is aligned right
* On focus, we highlight the field's content so the user can quickly clear or overwrite the placeholder text
* On focus, the user can press the up and down arrow keys to increase or decrease the value by 1
* Add changelog
* Remove unnecesary stepUp function
* Add a blank space between the emoji and the message within a notice popup
* Apply comment suggestions
* Remove duplicated text in the snackbar message after publishing a product
* Add support for product attribute taxonomy template
* Add tests
* Add changelog
* Fix format
* Improve changelog
* Add current version to the template
* Add tests for product attribute
* Fix template version
* Fix linting errors
* Refactor tests
* Fix linting errors
* Improve test
* Add comments and fix test
* Fix linting errors
* Fix tests by creating product attribute
* Improve formatting and add return type
* Bump template version to the correct release
* Update product title in smaller viewports
* Move secondary product actions to menu group on mobile
* Hide settings menu on smaller viewports
* Add changelog entry
* Make sure the WooCommerce page hook is untranslated
This works around a WP core bug, and addresses compatibility issues where WC core or 3rd party code expect the pagename or screen ID for one of our submenu pages to remain fixed despite translations.
* Add changelog
* Make PHPCS happy
Fix attribute taxonomy sort order meta key for improved consistency.
* whoops - close array for order meta key update
* Changelog.
* Update phpcs annotation.
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
Add $formatted_destination as an argument to the woocommerce_cart_no_shipping_available_html filter.
Developers should be able to access the $formatted_destination variable directly in order to return a new string to the filter including that address.
* Add docblock and changelog for woocommerce_cart_no_shipping_available_html tweak.
* Bump version tag for cart-shipping template.
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
* Mark note as read when viewing
* Show unread note count
* Add ability to fetch read or unread notes
* Count unread notes on server side to avoid pagination limits
* Add changelog entry
* Add data changelog entry
* Add check for note actions before checking length
* Add changelog entry
* Mark note as read after 3s delay
* Consolidate country data
* update test data
* remove upper case files
* remove upper case files
* remove upper case files
* update country data tests
* countries states updates for local
* revert settings-crud.test
* Set initial values prop from reset form function as optional
* Fix unsaved modal propmt to not be shown during form submission
* Reset form on save draft and before navigation starts
* Add comments ssuggestions
* Add pre build script to delete assets
* Chain the script instead
* Add the cleanup dependency to turbo config
* Add assets cleanup for build zip command
* Add initial add new option
* Hook in create attribute modal to add attribute field
* Add unit tests for the create attribute modal
* Add extra test to attribute input field
* Add changelog
* Add custom attribute term input field and support for custom attributes
* Fix tets
* Add track for custom attribute creation
* Fix changes after merge conflict
* Revert one change
* Fix lint error
* Seperate out some logic and make use of null as empty object versus id: undefined
* Add isNewAttributeListItem helper function
* Make use of helper function for create new markup
* Add css class to change the input width based on the screen's width
* Changelog
* Move class from pricing-section.scss to product-page.scss and use breakpoint 960px mixin
* Move className from currencyInputProps to InputControl
* Improve changelog
* Move 'half-width-field' class to currencyInputProps instead of adding it manually for the two currency fields
* Add 'half-width-field' class to SKU and Shipping Class
Sent as a parameter to getInputProps and getSelectControlProps to avoid overwriting any additional className
* Update changelog
* Add experimental open menu when user click the select control input element
* Open categories menu list when the user click the category field
* Fix linter error
* Move open menu from click to focus event
* Fix linter errors
* Add icons
* Add classic editor url
* Remove welcome guide link and icon
* Add initial settings menu
* Fix up button styling
* Move product settings to its own folder
* Remove unnecessary registerPlugin call
* Use number type control for menu order field
* Add tests around product settings component
* Allow reviews by default on all new products
* Alphabetize product properties
* Add changelog entry
* Add data changelog entry
* Convert indentation to tabs
* Fix up scss linting errors
* Remove whitespace
Avoid direct use of $_POST from within the validate_checkout() method.
* Changelog.
* Address some of the undocumented hook errors flagged by our linting check.
This does not address all of the undocumented hooks (there are many in this file), just the ones flagged by the GitHub Actions code sniff check. This is an effort to unblock the PR, which we otherwise cannot merge at present.
* Add missing `@since` tags (satisfy linter).
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
Make it easier to support many payment methods (within My Account > Payment Methods page).
* Update includes/class-wc-payment-tokens.php
Better backward-compatible by @jonathansadowski
Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>
* Add docblock for new filter `woocommerce_get_customer_payment_tokens_limit`.
* Add changelog.
Co-authored-by: Yehuda Hassine <yehuda@myinbox.in>
Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
Update the Azerbaijani manat symbol AZN
* Rebase, update currecy symbol (from mathematical pitchfork to manat).
* Add changelog.
* Use Azerbaijani manat symbol instead of similar mathematical character.
* Update data crud test for the AZN currency symbol.
* Update currency settings for API tests.
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
* Add initial category field component with new typeahead
Move search logic to useCategorySearch hook
Add initial add new category logic
Add parent category field to add new category modal
Adding some debug changes
Update category control to make use of internal selectItem function of select control
Add changelogs
Update pagesize back to 100
Add placeholder
Empty placeholder
Fix input and icon sizes
Fix input underline
Add max height and scroll to category dropdown
Add sorting of category items
Auto open parents when traversing up the tree using arrow keys
Add several comments
Add some initial unit tests for the category field component
Add tests for useCategorySearch hook and fixed minor bug
Update styling and autoselect parent if child is selected
Fix styling issues for the select control dropdown inside a modal
Fix issue with creating new category with parent
Add function comment and fixed border styling
* Fix up some issues after the rebase
* Some small fixes for the Category creation
* Fix up some styling issues around the add-new-item
* Add changelogs
* Remove unneeded export of toggle button props
* Fix create category error and tests in attribute field
* Fix some minor bugs and styling changes that came up during PR feedback
* Fix tests
* Make use of $gap variable for css
* Add product status badge
* Update status method to return keys
* Add tests around product status
* Add styling to badge
* Add changelog entry
* Change product status keys to enum
* Add enum return type to product status function
* Fix up lint errors
* Convert indentation to tabs
* Move shared product header components to separate file
* Fill header title with product name
* Create method to get product title
* Add tests around title
* Add changelog entry
* Remove unnecessary plugin registration
* Site Editor: Fix WooCommerce icons in the Site Editor
* Site Editor: Fix WooCommerce icons not loading in the site editor.
* Add additional FSE theme check
* Add scheduled sale fields to product form
* Close DateTimePickerControl's dropdown when blurring from input.
* Log when onChange is called for Controlled stories
* Handle when input changes occur but the end date is the same
* Fix DateTimePickerControl usage when uncontrolled
* Fix handling when blur happens before debounced onChange
* Add source param for subscription endpoint calls
- Adds an optional $source argument to the WC_Helper_API::url() method
- Get URL of page making WC_Helper::get-subscripitonts() request and add a
source arg to the WC_Helper_API::get() request made by that method
- Pass that source arg to the WC_Helper_API::url() methd from
WC_Helper_API::get()
* Add changelog file
* Use sripos instead of preg_match in WC_Helper::get_subscriptions()
- Update "source" argument name across methods to "query_string" to be
more generic
- Use separate variables to make it clear the URI of the requesting
page, and the value passed as the source query string are different
* Add @param declaration to function comment
* Address PHPCS issues
Co-authored-by: Jorge A. Torres <jorge.torres@automattic.com>
* updates to allow tests to run against both CI test env and JN
* update customer data file
* comment uddates
* baseURL update
* update settings data
* Update plugins/woocommerce/tests/api-core-tests/playwright.config.js
Co-authored-by: Greg <71906536+zhongruige@users.noreply.github.com>
* Update plugins/woocommerce/tests/api-core-tests/tests/customers/customers-crud.test.js
Co-authored-by: Greg <71906536+zhongruige@users.noreply.github.com>
* Update plugins/woocommerce/tests/api-core-tests/playwright.config.js
Co-authored-by: Greg <71906536+zhongruige@users.noreply.github.com>
* updates from code review
* remove erroneous space
* remove comments
* updates for Localhost, LocalWP and JN
Co-authored-by: Greg <71906536+zhongruige@users.noreply.github.com>
* Update class-woocommerce.php for 7.2
* Update stable tag in readme.txt
* Update version in woocommerce.php
* Update version in composer.json
* Update version in package.json
Add info on order datastore (and sync) to SSR
* Add changelog
* Make PHPCS happy
* Update plugins/woocommerce/includes/admin/views/html-admin-page-status-report.php
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Remove unnecessary import
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Update and correct the symbol for Libyan Dinars.
* Update wc-core-functions.php
* Update settings.js
* Add changelog.
* Update API test `can view all currencies` re Libyan Dinar.
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
* Fix business details tabs when Gutenberg is active
Fix business details tabs when Gutenberg is active
Fix business details tabs when Gutenberg is active
* Add changelog
* add use WP_Error
phpdoc was not using FQCN for WP_Error, however use is preferred to FQCN anyway
Fix: https://github.com/woocommerce/woocommerce/issues/35304
* Revert "add use WP_Error"
This reverts commit ff62deb10020689f96722e10c5c86669a1454125.
* use FQCN in PHPDoc when using FQCN in code
* add changelog
Add filter hook `handle_bulk_actions-woocommerce_page_wc-orders` to the HPOS admin list table.
This is a duplicate of core WP hook `handle_bulk_actions-<SCREEN_ID>` and allows for custom bulk actions to be handled in the context of the admin list table for HPOS orders.
* Add create attribute term modal
* Add back filter missed during rebase
* Add changelog
* Fix lint error
* Address some feedback from PR review
* Prevent first modal from closing if closing the second modal when clicking outside
* Fix double click toolbar behavior
* Fix initial block selection on editor load
* Add placeholder option to RichTextEditor
* Add image and video blocks
* Set toolbar height
* Allow inserter to be shown
* Allow media uploads in rich text editor
* Add changelog entries
* Fix media upload
* Check for existence of selected blocks before checking length
* Pass blocks to avoid race in detecting initially empty blocks
* Add sold individually inventory option
* Add backorder purchase options
* Add margin around collapsible content areas
* Add changelog entry
* Add tests around inventory section
* Fix up checkbox props after rebase
* Check for disabled track quantity toggle
* Update manage stock test
* Fix nested radio control label margin
Ensure the HPOS/COT order status correctly tracks the CPT order status (during manual order creation).
* Linting.
* Address coding standards (no need to prepare the query when there are no placeholders).
* Woops! Restore use of `$wpdb->prepare()`, add phpcs:ignore rule.
* Changes in the plugin-feature compatibility warnings:
- Show only active plugins in the "Incompatible with..." plugins view
- Show an empty page when the view is loaded and no Incompatible
plugins are active (instead of listing all the existing plugins)
* Add changelog file
* Also support syncing for HPOS with stats table.
* Add changelog.
* Fixup.
* More fixup.
* test commit by disabling importing admin test orders.
* Update get_items to work with HPOS.
* Modify tests to assert against invalid result.
* test commit for ci.
* Remove seperate test as its quite slow.
* Applied coding standards.
* Coding standards, part 2.
* Check order type is set before returning to prevent notice.
* Applied code standards.
* Remove type declaration since its not consistent with CPT datastore.
* Switch to a yoda condition (satisfy required linting check).
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
* Add product description title to classic product editor
* Remove bottom margin as its already added by the parent element
* Add changelog
* Update css and name, also fix some lint errors
* Fix spacing
* Override filter_meta_data method, since it should be a no-op anyway.
* Add changelog.
* Not include address indexes from filtered data.
* Applied coding standards.
* Updated COT plugin used to set up the local environment with COT enabled.
* Enable HPOS in the e2e environment using env var (#35057)
* Updated COT plugin used to set up the local environment with COT enabled.
* Used env var to enable HPOS
* Disable HPOS for performance tests
* Updated permissions
* Set ENABLE_HPOS to 1
Co-authored-by: Alex López <alex.lopez@automattic.com>
Co-authored-by: Jamel Noel Reid <MrJnrman@users.noreply.github.com>
* Set paths to e2e-pw
* Delete and untrack storage state files
* Add changelog
* Checkout updated version of smoke test daily workflow
* Allow setting allure output paths to e2e-pw folder using environment variables
* Set allure output paths to be inside api-core-tests/api-test-report folder
* Remove unnecessary TODO comment
* Disable product inventory toggle when inventory management is disabled
* Export conditional wrapper as experimental component
* Conditionally show the tooltip
* Add comment explaining the tooltip overlay
* Add components changelog entry
* Display tooltip on hover any portion of toggle or label
* Add changelog entry
* Fix scss lint error
* Center tooltip over label and toggle
* Fix up input props after rebase
* Add wrapper around field to maintain block item formatting
* Show a dismissible snackbar if the server responds an error
* Removed the default value New shipping class from the Name field and replaced it with a placeholder: e.g. Fragile products
* Only used the category's name when the user creates a new shipping class for the first time
* Fix linter errors
* Update grammar error
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
* Add empty initial values to form field to prevent controlled/uncontrolled react error
* Tune error handling
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
* add api-core-tests for system status
* add api-core-tests for system status
* add system status api-core-tests
* add system status api-core-tests formatting updates
* Allow additional props to be passed to the Form getInputProps method
* Remove getTextControlProps
* Pass additional shared props through getInputProps in shipping
* Simplify checkbox props
* Unwrap currency props
* Use onBlur event to sanitize prices
* Add changelog entry
* Add option to get checkbox props to form context helpers
* Update checkbox tracks handler naming and typing
* Fix up usage of getInputProps
* Add helper sanitize method
* Use sanitize helper method for product input fields
* Fix inventory input props after rebase
* Fix shipping typo
* Fix up form types after rebase
* Align all checkboxes on product page
* Rename new checkbox helper to getCheckboxControlProps
* Add helper method to get select control props
* Add data changelog entry
* Check for product name length on blur
* Add initial value for name to prevent uncontrolled value
* Add initial value for sku
* Fix trashing/untrashing orders when using COT:
- Trashing wasn't changing the update date on the orders table record.
- Trashing wasn't applying trash on the corresponding post.
- Untrashing wasn't actually deleting _wp_trash_meta_status in metadata.
* Fix: maybe_sync_order was syncing even with identical update dates.
* PHPCS is happy now.
* WP_DIE when attempting to load a trashed order in Admin
(same behavior as when using the posts table)
* Add changelog file
* Revert change in order records date comparison
Data comparison is needed too when the dates are equal, since data in the metadata table could have been modified as well.
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Fix handling of order status and trash meta when untrashing.
Untrashing an order was setting it to the default status of "pending"
instead of the previous status. This is what was happening:
1. Order is trashed, order meta table gets the value (e.g.) "on-hold"
for the _wp_trash_meta_status key
2. Post is trashed, post meta table gets "wc-on-hold"
3. Order is re-read, but then so is posts, and the order meta value is
updated to "wc-on-hold"
4. On untrash the previous order status from order meta table is
prefixed with "wc-", thus it becomes "wc-wc-on-hold", which is not
a valid status
5. Not having a valid status, the order is restored as the default
status of "pending payment"
To fix this, the previous status is stored in order meta table
with "wc-", and it doesn't get prefixed on untrash.
Also, wp_untrash_post is called on order untrash, otherwise the
trash metadata keeps dangling and being synced back and forth.
* Add unit tetst for the trash-untrash cycle
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
* Fix 'Invalid payment method' error upon double click 'Delete' #30862
An 'Invalid payment method' error shows when a user double clicks the
'Delete' button in the 'Add Payment method screen'. Every time the user clicks
the button, there is a GET request to delete the payment method. First request is
handled correctly, but subsequent requests throw an error, because the payment
method cannot be found since it was already deleted.
This adds an event handler to disable the button on the first
click.
* Add changelog entry
* Use AccessiblePrivateMethods in DataSynchronizer.
Also fix some code styling stuff.
* Introduce the woocommerce_feature_description_tip filter.
...and use it to display a warning for the COT feature
if there are orders pending sync.
* Display the plugin-feature incompatibility warning in all admin pages.
...except in the plugins list when we are already showing the
"You are viewing plugins with incompatibilities" page.
Also change the styling from warning to error.
* Add changelog file
* Revert accidental change.
Co-authored-by: Vedanshu Jain <vedanshu.jain.2012@gmail.com>
* Add initial add attribute modal
* Add async select control component and add attribute terms
* Make use of AsyncSelectControl for attributes
* Rearranged the add attribute form to make removing easier
* Make sure add button is disabled if fields are empty
* Remove the use of AsyncSelectControl for now
* Add disabled option and fix merge conflict
* Add attribute modal tests
* Remove unused trigger drag
* Add popover slot
* Small update to select control and fix multi selection in term field
* Add tests for attribute and attribute term fields
* Add changelogs
* Small fix after merge conflict
* Fix some styling and issue with select control when clearing item
* Fix lint error
* Fix up some styling issues after rebase
* Fix formatting, some styling issues, and address some PR feedback
* And confirmation dialog for closing the modal.
* Select the current new added shipping class
* Extracting constants into the right file
* Add unit tests
* Use setValue instead onChange to select the shipping class of the product