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 R xx.xx per KG | |
| add_action( 'woocommerce_price_html', 'wc_custom_price', 10, 2 ); | |
| function wc_custom_price( $price, $product ) { | |
| return sprintf( __( '%s per KG', 'woocommerce' ), woocommerce_price( $product->get_price() ) ); | |
| } | |
| ?> |
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 | |
| // Change the "Add Product" button url to the back end. | |
| add_filter('wcv_add_product_url', 'new_add_product_url'); | |
| function new_add_product_url(){ | |
| return admin_url('post-new.php?post_type=product'); | |
| } | |
| ?> |
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 | |
| // This code goes in the product-edit.php override template for wc-vendors pro | |
| // Replace WCVendors_Pro_Product_Form::description( $object_id, $product_description ); | |
| // with | |
| $product_description_args = array( | |
| 'editor_height' => 200, | |
| 'media_buttons' => true, | |
| 'teeny' => 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('wcv_dashboard_start_date', 'dashboard_start_date' ); | |
| function dashboard_start_date() { | |
| return '-1 week'; | |
| } | |
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 | |
| // Change the start date | |
| // from 1 year ago to 1 week ago | |
| add_filter('wcv_dashboard_start_date', 'dashboard_start_date' ); | |
| function dashboard_start_date() { | |
| return '-1 week'; | |
| } | |
| // Change the end date |
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 | |
| // Put this in your themes functions.php | |
| // Remove all existing actions and filters | |
| remove_action( 'woocommerce_after_shop_loop_item', array( 'WCV_Vendor_Shop', 'template_loop_sold_by'), 9, 2); | |
| remove_filter( 'woocommerce_get_item_data', array( 'WCV_Vendor_Cart', 'sold_by' ), 10, 2 ); | |
| remove_action( 'woocommerce_product_meta_start', array( 'WCV_Vendor_Cart', 'sold_by_meta' ), 10, 2 ); | |
| remove_filter( 'woocommerce_order_product_title', array( 'WCV_Emails', 'show_vendor_in_email' ), 10, 2 ); | |
| remove_action( 'woocommerce_add_order_item_meta', array( 'WCV_Vendor_Shop', 'add_vendor_to_order_item_meta'), 10, 2 ); | |
| remove_action( 'woocommerce_after_shop_loop_item', array( $wcvendors_pro->wcvendors_pro_store_controller, 'loop_sold_by' ), 8 ); |
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 text string for Jetpack Protect Bot Challenge Text | |
| * | |
| * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
| */ | |
| function digisavvy_change_humanity_string( $translated_text, $text, $domain ) { | |
| switch ( $translated_text ) { | |
| case 'Prove your humanity:' : | |
| $translated_text = __( 'Prove you\'re not a bot', 'jetpack' ); | |
| break; |
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 | |
| // The following functions will allow a vendor to edit and delete their media alt text and descriptions. | |
| // HOWEVER this requires post editing permissions so would also allow them to edit ALL posts and comments on | |
| // your site if they know how to do it. | |
| // WC Vendors will not support this code and is provided for educational purposes only. | |
| // THIS IS DANGEROUS TO DO -- USE AT YOUR OWN RISK -- YOU HAVE BEEN WARNED! | |
| // Update vendor role to support media handling | |
| function update_vendor_role( ){ |
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
| add_action( 'woocommerce_before_cart', 'move_proceed_button' ); | |
| function move_proceed_button( $checkout ) { | |
| echo '<a href="' . esc_url( WC()->cart->get_checkout_url() ) . '" class="checkout-button button alt wc-forward" >' . __( 'Proceed to Checkout', 'woocommerce' ) . '</a>'; | |
| } |
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 | |
| // WC Vendors Pro vendors list uses the same layout as the default woocommerce pagination | |
| // IF your theme is overriding the layout of the pagination links then you can use the following snippets (modified for your theme) | |
| // to make the vendor list pagination links wrap with your theme wrappers and styles. | |
| // Pagination wrapper opening tag | |
| add_filter( 'wcv_pagination_before', 'wcv_pagination_before_wrapper' ); | |
| function wcv_pagination_before_wrapper( $html ) { | |
| return '<div class="somethign else">'; |
OlderNewer