Skip to content

Instantly share code, notes, and snippets.

@wsmoak
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wsmoak/f8d407b19ec6e6c50a2e to your computer and use it in GitHub Desktop.
Save wsmoak/f8d407b19ec6e6c50a2e to your computer and use it in GitHub Desktop.
Chargify - Hide all shipping address fields (except country)
function hideShippingAddressFields()
{
$('#subscription_customer_attributes_address').hide();
$('#subscription_customer_attributes_address_2').hide();
$('#subscription_customer_attributes_city').hide();
$('#subscription_customer_attributes_state').hide();
$('#subscription_customer_attributes_zip').hide();
$('label[for="subscription_customer_attributes_address"]').text("");
$('label[for="subscription_customer_attributes_address_2"]').text("");
$('label[for="subscription_customer_attributes_city"]').text("");
$('label[for="subscription_customer_attributes_state"]').text("");
$('label[for="subscription_customer_attributes_zip"]').text("");
};
$(document).bind("afterSummaryRefresh", hideShippingAddressFields);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment