2021年3月25日星期四

How select multiple images

This code is for the WooCommerce product add-on plugin

    <?php  /**   * The Template for displaying image swatches field.   *   * @version 3.0.0   */    $loop          = 0;  $field_name    = ! empty( $addon['field_name'] ) ? $addon['field_name'] : '';  $required      = ! empty( $addon['required'] ) ? $addon['required'] : '';  $current_value = isset( $_POST['addon-' . sanitize_title( $field_name ) ] ) ?   wc_clean( $_POST[ 'addon-' . sanitize_title( $field_name ) ] ) : '';  ?>    <p class="form-row form-row-wide wc-pao-addon-wrap wc-pao-addon-<?php echo sanitize_title( $field_name ); ?>">  <p class="form-row form-row-wide wc-pao-addon-wrap wc-pao-addon-<?php echo sanitize_title( $field_name ) . '-' . $i; ?>">  <?php if ( empty( $required ) ) { ?>      <a href="#" title="<?php echo esc_attr__( 'None', 'woocommerce-product-addons' );       ?>" class="wc-pao-addon-image-swatch" data-value="" data-price="">          <img src="<?php echo esc_url( WC_Product_Addons_Helper::no_image_select_placeholder_src() ); ?>" />      </a>  <?php } ?>  

This code is for the WooCommerce product add-on plugin And there needs to be several choices for the image section I inquired on the WooCommerce site and the plugin page itself, but no one answered me

https://stackoverflow.com/questions/66810864/how-select-multiple-images March 26, 2021 at 11:58AM

没有评论:

发表评论