WC_Stripe_Payment_Request D

Total Complexity 329
Dependencies 16
Dependents 2
Total lines 2,008
Lines of code 1,098
Logical lines of code 588
Comment lines 615
Methods 64
Properties 6

Methods 64

Method Rating Maintainability Complexity Lines of code
ajax_get_selected_product_data()
B
37 17 69
should_show_payment_request_button()
B
47 17 35
build_display_items()
B
36 14 78
normalize_state()
A
48 17 30
get_product_data()
A
39 13 62
is_invalid_subscription_product()
A
49 15 28
get_shipping_options()
A
41 12 54
__construct()
A
51 14 23
is_product_supported()
A
52 11 23
filter_gateway_title()
A
54 10 22
get_normalized_state_from_pr_states()
A
55 9 18
calculate_shipping()
A
45 7 43
ajax_add_to_cart()
A
50 8 26
validate_state()
A
53 8 22
allowed_items_in_cart()
A
53 8 22
migrate_button_size()
S
54 7 21
has_subscription_product()
S
55 7 19
add_order_meta()
S
56 7 17
display_payment_request_button_separator_html()
S
58 6 15
get_button_height()
S
59 6 13
javascript_params()
S
45 4 41
display_payment_request_button_html()
S
53 5 25
scripts()
S
54 5 20
is_authentication_required()
S
65 5 9
get_product()
S
60 4 13
handle_payment_request_redirect()
S
60 4 12
get_button_settings()
S
52 3 26
get_normalized_state_from_wc_states()
S
62 4 11
get_login_confirmation_settings()
S
57 3 17
get_normalized_state()
S
64 4 10
are_keys_set()
S
65 4 9
ajax_update_shipping_method()
S
57 3 15
build_shipping_methods()
S
59 3 15
set_session()
S
70 4 6
ajax_create_order()
S
62 3 12
ajax_get_shipping_options()
S
56 2 18
ajax_get_cart_details()
S
57 2 17
update_shipping_method()
S
65 3 9
get_button_locations()
S
66 3 9
is_account_creation_possible()
S
68 3 7
get_product_price()
S
67 3 7
get_button_label()
S
70 3 6
is_page_supported()
S
73 3 5
get_normalized_postal_code()
S
65 3 9
get_login_redirect_url()
S
66 3 8
is_at_least_one_payment_request_button_enabled()
S
67 3 9
init()
S
53 1 21
supported_product_types()
S
60 1 16
get_button_type()
S
78 2 3
get_button_branded_type()
S
78 2 3
is_payment_request_enabled()
S
78 2 3
is_normalized_state()
S
68 2 7
custom_button_selector()
S
79 2 3
get_button_theme()
S
78 2 3
ajax_log_errors()
S
69 2 6
is_custom_button()
S
71 2 6
is_product()
S
79 2 3
should_show_prb_on_product_pages()
S
66 1 9
instance()
S
80 1 3
should_show_prb_on_checkout_page()
S
66 1 9
is_branded_button()
S
80 1 3
sanitize_string()
S
79 1 3
should_show_prb_on_cart_page()
S
69 1 7
ajax_clear_cart()
S
74 1 5