• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Easy Digital Downloads a2z

Easy Digital Downloads a2z

Easy Digital Downloads a2z

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / Files / templates/shortcode-receipt.php


Lines:

101 to 200 of 249
				</td>
			</tr>

			<tr>
				<td><strong><?php _e( 'Total Price', 'easy-digital-downloads' ); ?>:</strong></td>
				<td><?php echo edd_payment_amount( $payment->ID ); ?></td>
			</tr>

		<?php endif; ?>

		<?php do_action( 'edd_payment_receipt_after', $payment, $edd_receipt_args ); ?>
	</tbody>
</table>

<?php do_action( 'edd_payment_receipt_after_table', $payment, $edd_receipt_args ); ?>

<?php if ( filter_var( $edd_receipt_args['products'], FILTER_VALIDATE_BOOLEAN ) ) : ?>

	<h3><?php echo apply_filters( 'edd_payment_receipt_products_title', __( 'Products', 'easy-digital-downloads' ) ); ?></h3>

	<table id="edd_purchase_receipt_products" class="edd-table">
		<thead>
			<th><?php _e( 'Name', 'easy-digital-downloads' ); ?></th>
			<?php if ( edd_use_skus() ) { ?>
				<th><?php _e( 'SKU', 'easy-digital-downloads' ); ?></th>
			<?php } ?>
			<?php if ( edd_item_quantities_enabled() ) : ?>
				<th><?php _e( 'Quantity', 'easy-digital-downloads' ); ?></th>
			<?php endif; ?>
			<th><?php _e( 'Price', 'easy-digital-downloads' ); ?></th>
		</thead>

		<tbody>
		<?php if( $cart ) : ?>
			<?php foreach ( $cart as $key => $item ) : ?>

				<?php if( ! apply_filters( 'edd_user_can_view_receipt_item', true, $item ) ) : ?>
					<?php continue; // Skip this item if can't view it ?>
				<?php endif; ?>

				<?php if( empty( $item['in_bundle'] ) ) : ?>
				<tr>
					<td>
						<?php
            $price_id       = edd_get_cart_item_price_id( $item );
            $download_files = edd_get_download_files( $item['id'], $price_id );
            ?>

						<div class="edd_purchase_receipt_product_name">
							<?php echo esc_html( $item['name'] ); ?>
							<?php if ( edd_has_variable_prices( $item['id'] ) && ! is_null( $price_id ) ) : ?>
							<span class="edd_purchase_receipt_price_name"> – <?php echo esc_html( edd_get_price_option_name( $item['id'], $price_id, $payment->ID ) ); ?></span>
							<?php endif; ?>
						</div>

						<?php
            $notes = edd_get_product_notes( $item['id'] );
            if ( $edd_receipt_args['notes'] && ! empty( $notes ) ) : ?>
							<div class="edd_purchase_receipt_product_notes"><?php echo wp_kses_post( wpautop( $notes ) ); ?></div>
						<?php endif; ?>

						<?php
            if( edd_is_payment_complete( $payment->ID ) && edd_receipt_show_download_files( $item['id'], $edd_receipt_args, $item ) ) : ?>
						<ul class="edd_purchase_receipt_files">
							<?php
              if ( ! empty( $download_files ) && is_array( $download_files ) ) :
                foreach ( $download_files as $filekey => $file ) :
                  ?>
									<li class="edd_download_file">
										<a href="<?php echo esc_url( edd_get_download_file_url( $meta['key'], $email, $filekey, $item['id'], $price_id ) ); ?>" class="edd_download_file_link"><?php echo edd_get_file_name( $file ); ?></a>
									</li>
									<?php
                  do_action( 'edd_receipt_files', $filekey, $file, $item['id'], $payment->ID, $meta );
                endforeach;
              elseif ( edd_is_bundled_product( $item['id'] ) ) :
                $price_id         = edd_get_cart_item_price_id( $item );
                $bundled_products = edd_get_bundled_products( $item['id'], $price_id );

                foreach ( $bundled_products as $bundle_item ) :
                  ?>

									<li class="edd_bundled_product">
										<span class="edd_bundled_product_name"><?php echo edd_get_bundle_item_title( $bundle_item ); ?></span>
										<ul class="edd_bundled_product_files">
											<?php
                      $download_files = edd_get_download_files( edd_get_bundle_item_id( $bundle_item ), edd_get_bundle_item_price_id( $bundle_item ) );

                      if ( $download_files && is_array( $download_files ) ) :
                        foreach ( $download_files as $filekey => $file ) :
                          ?>
													<li class="edd_download_file">
														<a href="<?php echo esc_url( edd_get_download_file_url( $meta['key'], $email, $filekey, $bundle_item, $price_id ) ); ?>" class="edd_download_file_link"><?php echo edd_get_file_name( $file ); ?></a>
													</li>
													<?php
                          do_action( 'edd_receipt_bundle_files', $filekey, $file, $item['id'], $bundle_item, $payment->ID, $meta );
                        endforeach;
                      else :
                        echo '<li>' . __( 'No downloadable files found for this bundled item.', 'easy-digital-downloads' ) . '</li>';
« Previous [1] [2] [3] Next »

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      1 to 30 of 32
      • edd_currency_filter() – Formats the currency display
      • edd_format_amount() – Returns a nicely formatted amount.
      • edd_get_bundle_item_id() – Retrieve the ID of an item in a bundle.
      • edd_get_bundle_item_price_id() – Retrieve the price ID of a bundle item.
      • edd_get_bundle_item_title() – Get a fully formatted title of a bundle item
      • edd_get_bundled_products() – Retrieves the product IDs of bundled products
      • edd_get_cart_item_price_id() – Get cart item price id
      • edd_get_download_file_url() – Get Download File Url Constructs a secure file download url for a specific file.
      • edd_get_download_files() – Gets all download files for a product
      • edd_get_download_sku() – Retrieves a download SKU by ID.
      • edd_get_file_name() – Retrieves a file name for a product’s download file
      • edd_get_gateway_checkout_label() – Returns the checkout label for the specified gateway
      • edd_get_payment_fees() – Retrieves arbitrary fees for the payment
      • edd_get_payment_gateway() – Get the gateway associated with a payment
      • edd_get_payment_meta_cart_details() – Get the cart_details Key from Payment Meta
      • edd_get_payment_meta_user_info() – Get the user_info Key from Payment Meta
      • edd_get_payment_meta() – Get Payment Meta for a specific Payment
      • edd_get_payment_number() – Get the payment order number
      • edd_get_payment_status() – Get Payment Status
      • edd_get_payment_user_email() – Get the user email associated with a payment
      • edd_get_price_option_name() – Retrieves the name of a variable price option
      • edd_get_product_notes() – Get product notes
      • edd_has_variable_prices() – Checks to see if a download has variable prices enabled.
      • edd_is_bundled_product() – Determines if a product is a bundle
      • edd_is_payment_complete() – Checks whether a payment has been marked as complete.
      • edd_item_quantities_enabled() – Check if quantities are enabled
      • edd_payment_amount() – Get the fully formatted payment amount. The payment amount is retrieved using edd_get_payment_amount() and is then sent through edd_currency_filter() and edd_format_amount() to format the amount correctly.
      • edd_payment_subtotal() – Retrieves subtotal for payment (this is the amount before taxes) and then returns a full formatted amount. This function essentially calls edd_get_payment_subtotal()
      • edd_payment_tax() – Retrieves taxed amount for payment and then returns a full formatted amount This function essentially calls edd_get_payment_tax()
      • edd_receipt_show_download_files() – Show a download’s files in the purchase receipt
      [1] [2] Next »

      Call hooks

      1 to 9 of 9
      • edd_payment_receipt_after – action
      • edd_payment_receipt_after_table – action
      • edd_payment_receipt_before – action
      • edd_payment_receipt_products_title – filter
      • edd_purchase_receipt_after_files – action
      • edd_receipt_bundle_files – action
      • edd_receipt_files – action
      • edd_receipt_no_files_found_text – filter
      • edd_user_can_view_receipt_item – filter
      File name: templates/shortcode-receipt.php
      Plugin ref: Easy Digital Downloads
      Version: 2.10.1
      Deprecated?: No
      API Letters: P,R,S,T

      Published: 26th November 2019 | Last updated: 26th November 2019

      Primary Sidebar

      Information

      File name: templates/shortcode-receipt.php
      Plugin ref: Easy Digital Downloads
      Version: 2.10.1
      Deprecated?: No
      API Letters: P,R,S,T

      templates

      Footer

      Easy Digital Downloads a2z
      Easy Digital Downloads a2z
      Easy Digital Downloads a2z
      WordPress 5.7
      WordPress a2z
      WordPress core a2z
      Genesis Theme Framework a2z
      Jetpack a2z
      WordPress develop tests
      Easy Digital Downloads a2z
      WooCommerce a2z
      Yoast SEO a2z
      WordPress Blocks

      Site:  edd.wp-a2z.org
      © Copyright Easy Digital Downloads a2z 2014-2021. All rights reserved.


      Website designed and developed by Herb Miller
      Proudly powered by WordPress and oik plugins

      • Home
      • Blog
      • Sitemap
      • Sites