diff --git a/assets/js/angelleye-in-context-checkout.min.js b/assets/js/angelleye-in-context-checkout.min.js index 059f3746a..0d9734e8a 100644 --- a/assets/js/angelleye-in-context-checkout.min.js +++ b/assets/js/angelleye-in-context-checkout.min.js @@ -3,7 +3,6 @@ jQuery(function ($) { return false; } display_smart_button_on_cart_checkout(); - display_smart_button_on_product_page(); display_smart_button_on_min_cart(); function is_funding_icon_should_show_in_content() { var disallowed_funding_methods = angelleye_in_content_param.disallowed_funding_methods; @@ -18,6 +17,7 @@ jQuery(function ($) { } function display_smart_button_on_product_page() { if ($('.angelleye_button_single').length > 0) { + $('angelleye_button_single').empty(); window.paypalCheckoutReady = function () { allowed_funding_methods_single_array = $.parseJSON(angelleye_in_content_param.allowed_funding_methods); disallowed_funding_methods_single_array = $.parseJSON(angelleye_in_content_param.disallowed_funding_methods); @@ -416,6 +416,11 @@ jQuery(function ($) { $button.empty(); display_smart_button_on_min_cart(); } + var $single = $('.angelleye_button_single'); + if ( $single.length ) { + $single.empty(); + display_smart_button_on_product_page(); + } } ); $( 'form.checkout' ).on( 'click', 'input[name="payment_method"]', function() { var isPPEC = $( this ).is( '#payment_method_paypal_express' );