-
Notifications
You must be signed in to change notification settings - Fork 20
Add contextual banners for WooCommerce Services (now WooCommerce Tax) #2849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Ferdev
wants to merge
11
commits into
trunk
Choose a base branch
from
add/tax-migration-banners
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2c59a33
Add contextual banners for WooCommerce Shipping & Tax
Ferdev 50e4745
Update migration banner copy
Ferdev 3161463
Add WooCommerce Shipping Migration modal and contextual banner with d…
Ferdev 8b3ea8d
Fix php unit tests
Ferdev 2c27bb2
Fix broken phpunit tests
Ferdev 9466a6f
Add test docker environment to run phpunit tests
Ferdev 4f8a8e6
Fix broken e2e tests
Ferdev 111fec4
Delete unneeded files
Ferdev bd38173
Add pending link to migration banner
Ferdev 801bcea
Address PR comments
Ferdev 2c9f3c4
Fix a bug showing the migration banner
Ferdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FROM ubuntu:22.04 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && apt-get install -y software-properties-common curl gnupg2 lsb-release | ||
|
||
# Add ondrej/php PPA for PHP 8.2 packages | ||
RUN add-apt-repository ppa:ondrej/php -y \ | ||
&& apt-get update | ||
|
||
# Install PHP 8.2 and extensions | ||
RUN apt-get install -y \ | ||
php8.2 \ | ||
php8.2-cli \ | ||
php8.2-mysql \ | ||
php8.2-xml \ | ||
php8.2-mbstring \ | ||
php8.2-curl \ | ||
php8.2-zip \ | ||
php8.2-intl \ | ||
php8.2-bcmath \ | ||
php8.2-simplexml \ | ||
php8.2-tokenizer \ | ||
php8.2-xdebug \ | ||
php-pear \ | ||
git \ | ||
subversion \ | ||
mariadb-client \ | ||
nodejs \ | ||
npm \ | ||
unzip \ | ||
&& npm install -g pnpm \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install composer globally | ||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
|
||
WORKDIR /workspace | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD ["bash"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: "3.8" | ||
|
||
services: | ||
mariadb: | ||
image: mariadb:10.9 | ||
container_name: mariadb_container | ||
environment: | ||
MYSQL_USER: wp_test | ||
MYSQL_PASSWORD: wp_test | ||
MYSQL_DATABASE: wordpress_default | ||
MYSQL_ROOT_PASSWORD: root | ||
ports: | ||
- 3307:3306 | ||
healthcheck: | ||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] | ||
interval: 10s | ||
timeout: 5s | ||
retries: 3 | ||
|
||
php-tests: | ||
build: . | ||
container_name: php_tests_container | ||
depends_on: | ||
- mariadb | ||
working_dir: /workspace | ||
tty: true | ||
stdin_open: true | ||
volumes: | ||
- ../../:/workspace:cached | ||
environment: | ||
MYSQL_USER: wp_test | ||
MYSQL_PASSWORD: wp_test | ||
MYSQL_DATABASE: wordpress_default | ||
MYSQL_ROOT_PASSWORD: root | ||
WP_VERSION: "6.3.0" # adjust as needed | ||
WC_VERSION: "7.6.1" # adjust as needed | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
exec "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
WC_VERSION=${WC_VERSION:-"7.6.1"} | ||
WP_VERSION=${WP_VERSION:-"6.3.0"} | ||
|
||
echo "Cleaning previous WooCommerce clone..." | ||
if [ -d /tmp/woocommerce ]; then | ||
chmod -R u+w /tmp/woocommerce || true | ||
rm -rf /tmp/woocommerce | ||
fi | ||
|
||
echo "Cloning WooCommerce $WC_VERSION..." | ||
git clone --depth=1 --branch="$WC_VERSION" https://github.com/woocommerce/woocommerce.git /tmp/woocommerce | ||
|
||
echo "Installing WooCommerce dependencies..." | ||
cd /tmp/woocommerce/plugins/woocommerce | ||
composer install | ||
php bin/generate-feature-config.php | ||
|
||
echo "Setting up WordPress test environment..." | ||
mysql -h mariadb -u root -proot -e "DROP DATABASE IF EXISTS wp_test;" | ||
bash tests/bin/install.sh wp_test root root mariadb "${WP_VERSION}" | ||
|
||
if [[ "$WC_VERSION" == "7.5.1" || "$WC_VERSION" == "7.6.1" ]]; then | ||
echo "Installing PHPUnit 8 for legacy WC versions..." | ||
composer require -W phpunit/phpunit:^8 | ||
fi | ||
|
||
echo "Installing plugin dependencies..." | ||
cd /workspace | ||
composer install | ||
|
||
echo "Running PHPUnit tests..." | ||
./vendor/bin/phpunit -c phpunit.xml.dist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.