$data ) {
printf(
"\r\n",
esc_js( $var ),
wp_json_encode( $data )
);
}
$icon = get_site_icon_url();
if ( $icon ) {
printf( '' . "\r\n", esc_url( $icon ) );
}
$a['data']['customer_default_country'] = apply_filters( 'asp_ng_pp_default_country_override', $a['data']['customer_default_country'] );
// Show error message if shipping enabled, but shipping address collection is not enabled.
$shipping_address_enabled = get_post_meta( $a['data']['product_id'], 'asp_product_collect_shipping_addr', true );
if (
isset($a['data']['is_physical_product']) && !empty($a['data']['is_physical_product']) && empty($shipping_address_enabled)
){
$a['fatal_error'] = __('Configuration Error: Shipping is enabled for this product, but customer shipping address collection is disabled. You need to enable shipping address collection for physical product.', 'stripe-payments');
}
// Show error message if tax variation enabled, but address collection is not enabled.
$billing_address_enabled = get_post_meta( $a['data']['product_id'], 'asp_product_collect_billing_addr', true );
if (
(isset($a['data']['tax_variations']) && !empty($a['data']['tax_variations'])) &&
empty($billing_address_enabled)
){
$a['fatal_error'] = __('Configuration Error: Regional tax variation is enabled for this product, but customer address collection is disabled. You need to enable address collection for this product.', 'stripe-payments');
}
// Trigger action hook. Can be used to output additional data to payment popup before closing tag.
do_action( 'asp_ng_pp_output_before_closing_head' );
?>
>
>
' . "\r\n", $style['src'] );
}
}
foreach ( $a['scripts'] as $script ) {
if ( ! $script['footer'] ) {
printf( '' . "\r\n", $script['src'] );
}
}
foreach ( $a['scripts'] as $script ) {
if ( $script['footer'] ) {
printf( '' . "\r\n", $script['src'] );
}
}
foreach ( $a['styles'] as $style ) {
if ( $style['footer'] ) {
printf( '' . "\r\n", $style['src'] );
}
}
//Trigger a filter hook to allow other plugins to output additional data to payment popup before closing tag
echo apply_filters( 'asp_ng_pp_extra_output_before_closing_body', '');
//Trigger action to output additional data to payment popup before closing tag
do_action( 'asp_ng_pp_output_before_closing_body', $a );
?>