diff --git a/README.md b/README.md index 0f985f4..5a90fda 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # ledyer-checkout-for-woocommerce + Ledyer checkout plugin for WooCommerce ## Local dev environment @@ -20,6 +21,7 @@ You can add a breakpoint in `lco-functions.php` -> `lco_create_or_update_order` If you are missing data i woocommerce, make sure you have set the following: -* If you are logged in, your use must be set to country = sweden. User -> Edit profile -> Country/Region -> Sweden -* Make sure that the Woocommerce shop is configured to target Sweden. Woocommerce -> Settings -> General -> Country/Region -> Sweden -* Make sure that the Woocommerce shop is configured to use Swedish krona. Woocommerce -> Settings -> General -> Currency -> Swedish krona (kr) +- If you are logged in, your use must be set to country = sweden. User -> Edit profile -> Country/Region -> Sweden +- Make sure that the Woocommerce shop is configured to target Sweden. Woocommerce -> Settings -> General -> Country/Region -> Sweden +- Make sure that the Woocommerce shop is configured to use Swedish krona. Woocommerce -> Settings -> General -> Currency -> Swedish krona (kr) +- Make sure to enter a terms url in Ledyer checkout plugin settings. diff --git a/assets/scss/ledyer-checkout-for-woocommerce.scss b/assets/scss/ledyer-checkout-for-woocommerce.scss index 8ba25f3..6ca4063 100644 --- a/assets/scss/ledyer-checkout-for-woocommerce.scss +++ b/assets/scss/ledyer-checkout-for-woocommerce.scss @@ -8,12 +8,6 @@ width: 100%; } - .woocommerce-billing-fields, - .woocommerce-shipping-fields, - .woocommerce-terms-and-conditions-wrapper { - display: none; - } - #lco-iframe { display: flex; justify-content: center; diff --git a/build/ledyer-checkout-for-woocommerce.asset.php b/build/ledyer-checkout-for-woocommerce.asset.php index f54baf8..a6f4e92 100644 --- a/build/ledyer-checkout-for-woocommerce.asset.php +++ b/build/ledyer-checkout-for-woocommerce.asset.php @@ -1 +1 @@ - array('wp-polyfill'), 'version' => '1a2bf5df7229fa3f1127d147cd1362c4'); \ No newline at end of file + array('wp-polyfill'), 'version' => '2b52588deee13ae5704c06dae8bd9a99'); \ No newline at end of file diff --git a/build/ledyer-checkout-for-woocommerce.css b/build/ledyer-checkout-for-woocommerce.css index 9d386c2..c9b462a 100644 --- a/build/ledyer-checkout-for-woocommerce.css +++ b/build/ledyer-checkout-for-woocommerce.css @@ -1 +1 @@ -#lco-wrapper{display:flex;flex-direction:column;align-items:center}#lco-wrapper #lco-order-review,#lco-wrapper #lco-iframe{width:100%}#lco-wrapper .woocommerce-billing-fields,#lco-wrapper .woocommerce-shipping-fields,#lco-wrapper .woocommerce-terms-and-conditions-wrapper{display:none}#lco-wrapper #lco-iframe{display:flex;justify-content:center} +#lco-wrapper{display:flex;flex-direction:column;align-items:center}#lco-wrapper #lco-order-review,#lco-wrapper #lco-iframe{width:100%}#lco-wrapper #lco-iframe{display:flex;justify-content:center} diff --git a/classes/class-ledyer-templates.php b/classes/class-ledyer-templates.php index 86fd27d..4415f8e 100644 --- a/classes/class-ledyer-templates.php +++ b/classes/class-ledyer-templates.php @@ -27,7 +27,7 @@ public function filters() { // Unrequire WooCommerce Shipping State field. \add_filter( 'woocommerce_shipping_fields', array( $this, 'unrequire_wc_shipping_state_field' ) ); // Chage admin shipping fields in edit order admin panel - \add_filter('woocommerce_admin_shipping_fields', array($this, 'change_admin_shipping_fields'), 10, 1); + \add_filter('woocommerce_admin_shipping_fields', array($this, 'change_admin_shipping_fields'), 10, 1); } public function actions() { diff --git a/docker-compose.yml b/docker-compose.yml index fd8df8b..8f12ac7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ -version: '3.1' +version: "3.1" services: db: - image: mariadb:latest + image: mariadb:10.4 restart: on-failure ports: - 13306:3306 @@ -9,7 +9,7 @@ services: MYSQL_DATABASE: testdb MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress - MYSQL_RANDOM_ROOT_PASSWORD: '1' + MYSQL_RANDOM_ROOT_PASSWORD: "1" volumes: - dbdata:/var/lib/mysql @@ -74,7 +74,8 @@ services: wp core install --url=http://localhost:8181 --title="Ledyer Checkout" --admin_user=admin --admin_password=password --admin_email=info@example.com --path=/var/www/html --skip-email; wp rewrite structure /%postname%/; wp plugin install wordpress-importer --activate; - wp plugin install woocommerce --activate; + wp plugin install wp-rollback --activate; + wp plugin install woocommerce --version=8.2.2 --activate; wp theme install storefront --activate; wp wc tool run install_pages --user=1; wp import wp-content/plugins/woocommerce/sample-data/sample_products.xml --authors=create; diff --git a/templates/ledyer-checkout.php b/templates/ledyer-checkout.php index 389c9eb..61abb09 100644 --- a/templates/ledyer-checkout.php +++ b/templates/ledyer-checkout.php @@ -19,31 +19,38 @@ ?>
checkout() ); ?>