Skip to content

Commit

Permalink
fixes woo install
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrankiewicz committed Oct 31, 2023
1 parent 6e7ef02 commit e6eee48
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/playground/compile-wordpress/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ COPY ./build-assets/export-wxz.php /root/
RUN cd wordpress && \
cp /root/export-wxz.php wp-content/mu-plugins/export-wxz.php

# === Install WooCommerce, Polylang ===
# === Install Polylang ===
RUN cd wordpress/wp-content/mu-plugins && \
# Install plugins
for plugin_name in polylang woocommerce; do \
for plugin_name in polylang; do \
curl -L https://downloads.wordpress.org/plugin/{$plugin_name}.latest-stable.zip -o {$plugin_name}.zip && \
unzip {$plugin_name}.zip && \
rm {$plugin_name}.zip && \
Expand All @@ -146,6 +146,17 @@ RUN cd wordpress && ../wp-cli.phar --allow-root pll option update default_lang e
RUN cd wordpress && ../wp-cli.phar --allow-root pll option update media_support 0
RUN cd wordpress && ../wp-cli.phar --allow-root pll doctor translate

# === Install WooCommerce ===
RUN cd wordpress/wp-content/mu-plugins && \
# Install plugins
for plugin_name in woocommerce; do \
curl -L https://downloads.wordpress.org/plugin/{$plugin_name}.latest-stable.zip -o {$plugin_name}.zip && \
unzip {$plugin_name}.zip && \
rm {$plugin_name}.zip && \
# Create entry file in mu-plugins root
echo "<?php require_once __DIR__.'/$plugin_name/$plugin_name.php';" > $plugin_name.php; \
done;

# === WooCommerce === #
RUN cd wordpress && ../wp-cli.phar --allow-root import wp-content/mu-plugins/woocommerce/sample-data/sample_products.xml --authors=create
RUN cd wordpress && ../wp-cli.phar --allow-root wc payment_gateway update bacs --enabled=1 --user=admin
Expand Down

0 comments on commit e6eee48

Please sign in to comment.