/* Code to add in sidebar where you want to show links */ <?php foreach ( wc_get_account_menu_items() as $endpoint => $label ) : ?> <li class="<?php echo wc_get_account_menu_item_classes( $endpoint ); ?>"> <a class="" href="<?php echo esc_url( wc_get_account_endpoint_url( $endpoint ) ); ?>"><?php echo esc_html( $label ); ?></a> </li> <?php endforeach; ?> ======================================================================= // Add custom button to My Account > Orders page add_filter( 'woocommerce_my_account_my_orders_actions', 'cu...
// Add a custom field before single add to cart add_action ( 'woocommerce_before_add_to_cart_button' , 'custom_product_price_field' , 5 ); function custom_product_price_field ( ) { echo '<div class="custom-text text"> <h3>Rental</h3> <label>Start Date:</label> <input type="date" name="rental_date" value="" class="rental_date" /> <label>Period Rental:</label> <select name="custom_price" class="custom_price"> <option value="70" selected="selected">2 days</option> <option value="40">4 days</option> </select> </div>' ; } // Get custom field value, calculate new item price, save it as custom cart item data add_filter ( 'woocommerce_add_cart_item_data' , 'add_custom_field_data' , 20 , 2 ); function add_custom...