Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions tests/WP_Ultimo/Models/Membership_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -1091,23 +1091,23 @@ public function test_swap_replaces_plan_for_registered_custom_plan_type(): void

add_filter('wu_plan_product_types', $register_network_type);

$network_product = new Product(
$network_product = wu_create_product(
[
'name' => 'Network Plan',
'slug' => 'network-plan-' . wp_generate_password(6, false),
'description' => 'A custom plan type registered by an addon',
'pricing_type' => 'paid',
'amount' => 49.00,
'currency' => 'USD',
'duration' => 1,
'duration_unit' => 'month',
'type' => 'network',
'recurring' => true,
'active' => true,
'name' => 'Network Plan',
'slug' => 'network-plan-' . wp_generate_password(6, false),
'description' => 'A custom plan type registered by an addon',
'pricing_type' => 'paid',
'amount' => 49.00,
'currency' => 'USD',
'duration' => 1,
'duration_unit' => 'month',
'type' => 'network',
'recurring' => true,
'active' => true,
'skip_validation' => true,
]
);
$network_product->set_skip_validation(true);
$network_product->save();
$this->assertNotWPError($network_product);

$cart = new \WP_Ultimo\Checkout\Cart(
[
Expand Down Expand Up @@ -1451,7 +1451,7 @@ public function test_renew_preserves_cancellation_date_on_active_renewal(): void
/**
* Test renew() DOES clear date_cancellation when reactivating a cancelled membership.
*
* renew() is called by reactivate(), and also directly by gateways via IPN/webhook.
* Renew() is called by reactivate(), and also directly by gateways via IPN/webhook.
* It must clear the cancellation timestamp when the previous status was CANCELLED
* so that cancelled membership records are cleaned up in a single save.
*/
Expand Down
Loading