Skip to content

Commit

Permalink
devops: More CI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kidunot89 committed May 20, 2024
1 parent 251220a commit d2b9f22
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/_data/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
dump.sql
*.sql
Empty file removed tests/_data/.gitkeep
Empty file.
13 changes: 8 additions & 5 deletions tests/_data/e2e-config.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<?php

// forcing has_block_template to be false
add_filter( 'woocommerce_has_block_template', '__return_false', 10, 2 );

//Additional cart fees.
\add_action(
add_action(
'woocommerce_cart_calculate_fees',
static function () {
$percentage = 0.01;
Expand All @@ -11,7 +14,7 @@ static function () {
);

// Create Shipping Zones.
$zone = new \WC_Shipping_Zone();
$zone = new WC_Shipping_Zone();
$zone->set_zone_name( 'Local' );
$zone->set_zone_order( 1 );
$zone->add_location( 'GB', 'country' );
Expand All @@ -20,23 +23,23 @@ static function () {
$zone->add_shipping_method( 'flat_rate' );
$zone->add_shipping_method( 'free_shipping' );

$zone = new \WC_Shipping_Zone();
$zone = new WC_Shipping_Zone();
$zone->set_zone_name( 'Europe' );
$zone->set_zone_order( 2 );
$zone->add_location( 'EU', 'continent' );
$zone->save();
$zone->add_shipping_method( 'flat_rate' );
$zone->add_shipping_method( 'free_shipping' );

$zone = new \WC_Shipping_Zone();
$zone = new WC_Shipping_Zone();
$zone->set_zone_name( 'California' );
$zone->set_zone_order( 3 );
$zone->add_location( 'US:CA', 'state' );
$zone->save();
$zone->add_shipping_method( 'flat_rate' );
$zone->add_shipping_method( 'free_shipping' );

$zone = new \WC_Shipping_Zone();
$zone = new WC_Shipping_Zone();
$zone->set_zone_name( 'US' );
$zone->set_zone_order( 4 );
$zone->add_location( 'US', 'country' );
Expand Down

0 comments on commit d2b9f22

Please sign in to comment.