This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); | |
| function custom_override_checkout_fields( $fields ) { | |
| unset($fields['billing']['billing_first_name']); | |
| unset($fields['billing']['billing_last_name']); | |
| unset($fields['billing']['billing_company']); | |
| unset($fields['billing']['billing_address_1']); | |
| unset($fields['billing']['billing_address_2']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' ); | |
| function custom_override_checkout_fields( $fields ) { | |
| unset($fields['billing']['billing_first_name']); | |
| unset($fields['billing']['billing_last_name']); | |
| unset($fields['billing']['billing_company']); | |
| unset($fields['billing']['billing_address_1']); | |
| unset($fields['billing']['billing_address_2']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: WooCommerce Remove Variation "From: $XX" Price | |
| * Plugin URI: https://gist.github.com/BFTrick/7643587 | |
| * Description: Disable the WooCommerce variable product "From: $X" price. | |
| * Author: Patrick Rauland | |
| * Author URI: http://patrickrauland.com/ | |
| * Version: 1.0 | |
| * | |
| * This program is free software: you can redistribute it and/or modify |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Change empty price | |
| function custom_empty_price( $price, $product ) { | |
| return __( 'Call or Email for price', 'WooCommerce' ) ; | |
| } | |
| add_filter( 'woocommerce_variable_empty_price_html', 'custom_empty_price', 10, 2 ); | |
| add_filter( 'woocommerce_empty_price_html', 'custom_empty_price', 10, 2 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Change from text on price | |
| function custom_from_price_html( $price, $product ) { | |
| if ( strpos( $price, 'From: ' ) <> false ) | |
| return str_replace( 'From: ', '', $price ) . __( ' and up', 'woocommerce'); | |
| else return $price; | |
| } | |
| add_filter( 'woocommerce_get_price_html', 'custom_from_price_html', 10, 2 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Add save percent next to sale item prices. | |
| add_filter( 'woocommerce_sale_price_html', 'woocommerce_custom_sales_price', 10, 2 ); | |
| function woocommerce_custom_sales_price( $price, $product ) { | |
| $percentage = round( ( ( $product->regular_price - $product->sale_price ) / $product->regular_price ) * 100 ); | |
| return $price . sprintf( __(' Save %s', 'woocommerce' ), $percentage . '%' ); | |
| } | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter( 'woocommerce_payment_complete_order_status', 'virtual_order_payment_complete_order_status', 10, 2 ); | |
| function virtual_order_payment_complete_order_status( $order_status, $order_id ) { | |
| $order = new WC_Order( $order_id ); | |
| if ( $order_status == 'processing' && | |
| ( $order->status == 'on-hold' || $order->status == 'pending' || $order->status == 'failed' ) ) { | |
| $virtual_order = true; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_filter('woocommerce_email_headers', 'woo_cc_emails' ); | |
| function woo_cc_emails() { | |
| return 'Bcc: [email protected]' . "\r\n"; | |
| } | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Add previous and next links to products under the product details | |
| add_action( 'woocommerce_single_product_summary', 'wc_next_prev_products_links', 60 ); | |
| function wc_next_prev_products_links() { | |
| previous_post_link( '%link', '< Previous' ); | |
| echo ' | '; | |
| next_post_link( '%link', 'Next >' ); | |
| } | |
| ?> |