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
| function woo_custom_single_image_size ( $size ) { | |
| $size['height'] = $size['width']; | |
| $size['crop'] = 1; | |
| return $size; | |
| } | |
| add_filter('woocommerce_get_image_size_single', 'woo_custom_single_image_size', 50, 1); | |
| add_filter('woocommerce_get_image_size_shop_single', 'woo_custom_single_image_size', 50, 1); | |
| add_filter('woocommerce_get_image_size_thumbnail', 'woo_custom_single_image_size', 50, 1); | |
| add_filter('woocommerce_get_image_size_gallery_thumbnail', 'woo_custom_single_image_size', 50, 1); |
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
| function custom_gpf_can_prepopulate_condition ( $feedData ) { | |
| $feedData['condition']['can_prepopulate'] = true; | |
| return $feedData; | |
| } | |
| add_filter( 'woocommerce_gpf_all_product_fields', 'custom_gpf_can_prepopulate_condition', 10, 1); |
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
| function custom_description_tab_name ( $name ) { | |
| return 'Ingredients'; | |
| } | |
| add_filter( 'woocommerce_product_description_heading', 'custom_description_tab_name', 10 ); | |
| add_filter( 'woocommerce_product_description_tab_title', 'custom_description_tab_name', 10 ); |
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: Fix customer tokens for WooCommerce Stripe | |
| * Plugin URI: | |
| * Description: Fixes outdated customer tokens saved on customers registered before mid 2014 | |
| * Author: Maria Gorska | |
| * Author URI: | |
| * License: GPLv3 | |
| * Version: 0.1.0 | |
| * Version: 0.1.0 |
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
| function woocommerce_after_shop_loop_item_title_short_description() { | |
| global $product; | |
| if ( ! $product->get_sku() ) return; | |
| ?> <div itemprop="description"> | |
| <?php echo apply_filters( 'woocommerce_short_description', $product->get_sku() ) ?> </div> | |
| <?php | |
| } | |
| add_action('woocommerce_after_shop_loop_item_title', 'woocommerce_after_shop_loop_item_title_short_description', 5); |
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_filter( 'woocommerce_defer_transactional_emails', '__return_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
| add_action('init','remove_loop_button'); | |
| function remove_loop_button(){ | |
| remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); | |
| } | |
| add_action('woocommerce_after_shop_loop_item','replace_add_to_cart'); | |
| function replace_add_to_cart() { | |
| global $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
| function automaticallyApproveRegisteredVendors ( $vendorData ) { | |
| $vendorData['role'] = 'wc_product_vendors_admin_vendor'; | |
| return $vendorData; | |
| } | |
| add_filter( 'wcpv_registration_default_user_data', 'automaticallyApproveRegisteredVendors', 10, 1); |
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
| function addTrackingCodeinGAPlugin ( $requireCode ) { | |
| $requireCode .= "ga('require', 'GTM-KZ35PPF');" | |
| return $requireCode; | |
| } | |
| add_filter( 'woocommerce_ga_snippet_require', 'addTrackingCodeinGAPlugin', 10, 1 ); |
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_filter( 'woocommerce_form_field_args', 'custom_form_field_args', 30, 3 ); | |
| function custom_form_field_args( $args, $key, $value ) { | |
| $args['autofocus'] = ''; | |
| return $args; | |
| }; |