DRAGOS
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
For the plugin creator:
The way I’m fixing that is by using the frontend to call an ajax function that deletes sets of 300 or so. If the loop happens only in the backend, it will always crash if we have a lot of orders to delete. We’re dealing with 180k orders!
Forum: Plugins
In reply to: [WooCommerce] Shipping Display ModeIt’s quite easy, you need to use the templates.
In woocommerce/cart/cart-shipping.php replace the code for rendering radio buttons with the code to print the select control (I commented the radio buttons section below):
<?php elseif ( get_option( 'woocommerce_shipping_method_format' ) === 'select' ) : ?> <select name="shipping_method[<?php echo $index; ?>]" data-index="<?php echo $index; ?>" id="shipping_method_<?php echo $index; ?>" class="shipping_method"> <?php foreach ( $available_methods as $method ) : ?> <option value="<?php echo esc_attr( $method->id ); ?>" <?php selected( $method->id, $chosen_method ); ?>><?php echo wp_kses_post( wc_cart_totals_shipping_method_label( $method ) ); ?></option> <?php endforeach; ?> </select> <?php else : ?> <!-- <ul id="shipping_method"> <?php foreach ( $available_methods as $method ) : ?> <li> <input type="radio" name="shipping_method[<?php echo $index; ?>]" data-index="<?php echo $index; ?>" id="shipping_method_<?php echo $index; ?>_<?php echo sanitize_title( $method->id ); ?>" value="<?php echo esc_attr( $method->id ); ?>" <?php checked( $method->id, $chosen_method ); ?> class="shipping_method" /> <label for="shipping_method_<?php echo $index; ?>_<?php echo sanitize_title( $method->id ); ?>"><?php echo wp_kses_post( wc_cart_totals_shipping_method_label( $method ) ); ?></label> </li> <?php endforeach; ?> --> <select name="shipping_method[<?php echo $index; ?>]" data-index="<?php echo $index; ?>" id="shipping_method_<?php echo $index; ?>" class="shipping_method"> <?php foreach ( $available_methods as $method ) : ?> <option value="<?php echo esc_attr( $method->id ); ?>" <?php selected( $method->id, $chosen_method ); ?>><?php echo wp_kses_post( wc_cart_totals_shipping_method_label( $method ) ); ?></option> <?php endforeach; ?> </select> <?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)