remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_single_price', 40 );
add_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_single_price', 10 );
-
+//addfilter('woocommercevariationpricehtml', 'myfunction', $product, 2);
+//
+//function myfunction($price, $product) {
+//
+//$price = getpostmeta( $product->variationid, 'regular_price');
+//// perform calculation on $price.
+//return $price;
+//}
//remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
//add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 20 );
foreach ( $attributes as $attribute_name => $options ) : ob_start(); ?>
<tr>
<td class="value">
- <?php $selected = isset( $_REQUEST[ 'attribute_' . sanitize_title( $attribute_name ) ] ) ? wc_clean( $_REQUEST[ 'attribute_' . sanitize_title( $attribute_name ) ] ) : $product->get_variation_default_attribute( $attribute_name );
+ <?php // $selected = isset( $_REQUEST[ 'attribute_' . sanitize_title( $attribute_name ) ] ) ? wc_clean( $_REQUEST[ 'attribute_' . sanitize_title( $attribute_name ) ] ) : $product->get_variation_default_attribute( $attribute_name );
+ $selected = $product->get_variation_default_attribute( $attribute_name );
wc_dropdown_variation_attribute_options( array( 'options' => $options, 'attribute' => $attribute_name, 'product' => $product, 'selected' => $selected ) );
echo end( $attribute_keys ) === $attribute_name ? apply_filters( 'woocommerce_reset_variations_link', '<a class="reset_variations" href="#">' . __( 'Clear', 'woocommerce' ) . '</a>' ) : '';
?>