@@ -446,6 +446,12 @@ public function provide_get_product_tax_tests() {
446
446
447
447
public function test_get_product_price_includes_subscription_sign_up_fee () {
448
448
$ mock_product = $ this ->create_mock_subscription ( 'subscription ' );
449
+ add_filter (
450
+ 'test_deposit_get_product ' ,
451
+ function () use ( $ mock_product ) {
452
+ return $ mock_product ;
453
+ }
454
+ );
449
455
450
456
// We have a helper because we are not loading subscriptions.
451
457
WC_Subscriptions_Product::set_sign_up_fee ( 10 );
@@ -458,6 +464,12 @@ public function test_get_product_price_includes_subscription_sign_up_fee() {
458
464
459
465
public function test_get_product_price_includes_variable_subscription_sign_up_fee () {
460
466
$ mock_product = $ this ->create_mock_subscription ( 'subscription_variation ' );
467
+ add_filter (
468
+ 'test_deposit_get_product ' ,
469
+ function () use ( $ mock_product ) {
470
+ return $ mock_product ;
471
+ }
472
+ );
461
473
462
474
// We have a helper because we are not loading subscriptions.
463
475
WC_Subscriptions_Product::set_sign_up_fee ( 10 );
@@ -483,6 +495,12 @@ public function test_get_product_price_throws_exception_for_products_without_pri
483
495
484
496
public function test_get_product_price_throws_exception_for_a_non_numeric_signup_fee () {
485
497
$ mock_product = $ this ->create_mock_subscription ( 'subscription ' );
498
+ add_filter (
499
+ 'test_deposit_get_product ' ,
500
+ function () use ( $ mock_product ) {
501
+ return $ mock_product ;
502
+ }
503
+ );
486
504
WC_Subscriptions_Product::set_sign_up_fee ( 'a ' );
487
505
488
506
$ this ->expectException ( WCPay \Exceptions \Invalid_Price_Exception::class );
0 commit comments