updated plugin Easy Digital Downloads version 3.1.1.4.2

This commit is contained in:
2023-06-05 11:21:17 +00:00
committed by Gitium
parent e5482aabb7
commit b7bbe6d733
105 changed files with 3161 additions and 1326 deletions

View File

@ -7,7 +7,7 @@
$is_checkout_block = empty( $is_cart_widget ) && ( edd_is_checkout() || edd_doing_ajax() );
?>
<div id="edd_checkout_cart" class="<?php echo esc_attr( implode( ' ', $cart_classes ) ); ?>">
<?php if ( edd_is_checkout() ) : ?>
<?php if ( $is_checkout_block ) : ?>
<div class="edd-blocks-cart__row edd-blocks-cart__row-header edd_cart_header_row">
<div class="edd_cart_item_name"><?php esc_html_e( 'Item Name', 'easy-digital-downloads' ); ?></div>
<div class="edd_cart_item_price"><?php esc_html_e( 'Item Price', 'easy-digital-downloads' ); ?></div>

View File

@ -44,5 +44,13 @@ if ( function_exists( 'EDD_CFM' ) ) {
<input class="edd-input" type="text" name="edd_last" id="edd-last" placeholder="<?php esc_html_e( 'Last name', 'easy-digital-downloads' ); ?>" value="<?php echo esc_attr( $customer['last_name'] ); ?>" aria-describedby="edd-last-description" <?php EDD\Blocks\Functions\mark_field_required( 'edd_last' ); ?>/>
<p class="edd-description" id="edd-last-description"><?php esc_html_e( 'We will use this as well to personalize your account experience.', 'easy-digital-downloads' ); ?></p>
</div>
<?php endif; ?>
<?php
endif;
/**
* Allow users to add additional fields to the checkout form.
*
* @param array $customer Customer information. Note that this parameter is not in the original shortcode hook.
*/
do_action( 'edd_purchase_form_user_info_fields', $customer );
?>
</fieldset>

View File

@ -4,7 +4,8 @@
'download_id' => get_the_ID(),
'align' => $block_attributes['purchase_link_align'],
'show_price' => (bool) $block_attributes['show_price'],
'direct' => 'direct' === edd_get_download_button_behavior( get_the_ID() ),
);
echo EDD\Blocks\Downloads\buy_button( $args );
echo EDD\Blocks\Downloads\buy_button( $args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</footer>

View File

@ -1,5 +1,4 @@
<?php
$price_id = $item->price_id;
$download_files = edd_get_download_files( $item->product_id, $item->price_id );
if ( $block_attributes['hide_empty'] && empty( $download_files ) ) {
return;
@ -12,28 +11,49 @@ $classes = array(
if ( $block_attributes['search'] && edd_is_pro() ) {
$classes[] = 'edd-pro-search__product';
}
$registered_columns = EDD\Blocks\Orders\get_user_downloads_block_columns();
?>
<div class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
<div class="edd-blocks__row-label"><?php echo esc_html( $name ); ?></div>
<?php
foreach ( $registered_columns as $column_id => $column ) {
$row = $column['row'];
<?php if ( ! edd_no_redownload() ) : ?>
<div class="edd-order-item__files">
$classes = array(
'edd-blocks__row-column',
'edd-blocks__row-column--' . $column_id,
);
if ( ! empty( $row['classes'] ) ) {
$classes = array_merge( $classes, $row['classes'] );
}
?>
<div class="<?php echo esc_attr( implode( ' ', array_filter( $classes ) ) ); ?>">
<?php
if ( $download_files ) :
foreach ( $download_files as $filekey => $file ) :
$download_url = edd_get_download_file_url( $order, $order->email, $filekey, $item->product_id, $price_id );
?>
<div class="edd-order-item__file">
<a href="<?php echo esc_url( $download_url ); ?>" class="edd-order-item__file-link">
<?php echo esc_html( edd_get_file_name( $file ) ); ?>
</a>
</div>
<?php
endforeach;
else :
echo esc_html( $block_attributes['nofiles'] );
endif; // End $download_files
$action_args = array(
'name' => $name,
'order_item' => $item,
'order' => $order,
'block_attributes' => $block_attributes,
'download_files' => $download_files,
);
/**
* Renders a column in the user downloads block.
*
* To add a new column, use the `edd_blocks_user_download_columns` filter.
*
* @since 2.0.6
* @param array $action_args The arguments to pass to the hook.
* @param string $name The name of the product.
* @param EDD\Orders\Order_Item $item The order item.
* @param EDD\Orders\Order $order The order object.
* @param array $block_attributes The block attributes.
* @param array $download_files The download files.
*/
do_action( 'edd_blocks_user_downloads_block_column_' . $column_id, $action_args );
?>
</div>
<?php endif; ?>
<?php } ?>
</div>