diff --git a/includes/Admin/Forms/Field_Manager.php b/includes/Admin/Forms/Field_Manager.php index f07360528..b3ca8f9a7 100755 --- a/includes/Admin/Forms/Field_Manager.php +++ b/includes/Admin/Forms/Field_Manager.php @@ -268,7 +268,7 @@ public function check_field_visibility( &$form_field ) { } } if ( $visibility_selected == 'subscribed_users' && is_user_logged_in() ) { - $user_pack = Subscription::init()->get_user_pack( get_current_user_id() ); + $user_pack = ( new Subscription() )->get_user_pack( get_current_user_id() ); if ( empty( $visibility_choices ) && ! empty( $user_pack ) ) { $show_field = true; } else if ( ! empty( $user_pack ) && ! empty( $visibility_choices ) ) { diff --git a/includes/Traits/TaxableTrait.php b/includes/Traits/TaxableTrait.php index 778b8abad..b8e3ca818 100644 --- a/includes/Traits/TaxableTrait.php +++ b/includes/Traits/TaxableTrait.php @@ -10,6 +10,7 @@ use WC_Countries; use WC_Customer; use WeDevs\Wpuf\Admin\Forms\Form; +use WeDevs\Wpuf\Admin\Subscription; use WeDevs\Wpuf\Data\Country_State; trait TaxableTrait { @@ -440,7 +441,7 @@ function wpuf_calculate_taxes( $post_data ) { if ( isset( $post_data['type'] ) && isset( $post_data['id'] ) ) { if ( 'pack' === $post_data['type'] ) { - $pack = Subscription::init()->get_subscription( $post_data['id'] ); + $pack = ( new Subscription() )->get_subscription( $post_data['id'] ); $billing_amount = $pack->meta_value['billing_amount']; $user_id = $current_user->ID; } elseif ( 'post' === $post_data['type'] ) {