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
| /** | |
| * WC Vendors Pro: clean up shipping label and avoid "Vendor Shipping". | |
| */ | |
| add_filter( 'wcvendors_pro_shipping_label', function( $label, $vendor_id, $rate ) { | |
| // Change this if you want a different default. | |
| $fallback_method = 'Standard Shipping'; | |
| $vendor_term = function_exists( 'wcv_get_vendor_name' ) ? wcv_get_vendor_name( true, true ) : 'Vendor'; |
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
| /** | |
| * Fix HTML entities in XML feeds | |
| */ | |
| add_filter( 'adt_product_feed_xml_attribute_handling', function( $handled, $product, $key, $value, $feed_config, $channel_attributes, $feed ) { | |
| if ( $handled || ! is_object( $product ) || ! is_object( $feed ) ) { | |
| return $handled; | |
| } | |
| $target_feed_id = 37281; | |
| $is_target_feed = false; |
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
| /** | |
| * Hide the Helpful Resources and Plugins & Licenses cards with CSS and JavaScript | |
| */ | |
| function hide_wcv_dashboard_sections() { | |
| // Only load on the marketplace dashboard page | |
| $screen = get_current_screen(); | |
| if ( ! $screen || 'wc-vendors_page_wc-vendors-marketplace-dashboard' !== $screen->id ) { | |
| return; | |
| } | |
| ?> |
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
| /** | |
| * Fix filter priorities to ensure custom fields load before data manipulation | |
| */ | |
| add_action( 'plugins_loaded', function() { | |
| // Only run if Product Feed Elite classes exist | |
| if ( ! class_exists( '\AdTribes\PFE\Classes\Extra_Attributes' ) || | |
| ! class_exists( '\AdTribes\PFE\Classes\Product_Data_Manipulation' ) ) { | |
| return; | |
| } |
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 this code to your theme's functions.php file | |
| * | |
| * FINAL SOLUTION - Table Rate Shipping Cheapest Rate Fix | |
| * | |
| * This improved solution fixes the issue where Table Rate Shipping returns multiple rates | |
| * for products without shipping labels, and the feed incorrectly shows the most expensive rate. | |
| * | |
| * To enable debugging, add this line to wp-config.php (temporarily): |
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: Product Feed - Table Rate Shipping Cheapest Rate Fix (Final Solution) | |
| * Description: Filters shipping data to only include the cheapest shipping rate per country/region for products without shipping labels. This fixes the issue where Table Rate Shipping returns multiple rates and Google Merchant Center picks the most expensive one. | |
| * Version: 3.0.0 | |
| * Author: AdTribes Support | |
| * | |
| * FINAL SOLUTION - Addresses all issues: | |
| * - Works for both Product Feed Pro and Product Feed Elite | |
| * - Handles all price formats correctly (including edge cases) |
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 remove_wcv_helpful_resources( $resources ) { | |
| return array(); | |
| } | |
| add_filter( 'wcv_helpful_resources', 'remove_wcv_helpful_resources', 10, 1 ); | |
| /** | |
| * Hide the Helpful Resources and Plugins & Licenses cards with CSS and JavaScript | |
| */ | |
| function hide_wcv_dashboard_sections() { | |
| // Only load on the marketplace dashboard page |
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
| /** | |
| * Default SKU Sorting for WooCommerce Wholesale Order Form | |
| * | |
| * This snippet sets the default sorting to SKU (lowest to highest) | |
| * when the order form is first loaded (no search, no explicit sorting). | |
| * | |
| * Copy this entire code into Code Snippets plugin | |
| */ | |
| add_filter( 'wwof_posts_clauses_request', 'wwof_default_sku_sorting', 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
| /** | |
| * SKU Search Relevance Fix for WooCommerce Wholesale Order Form | |
| * | |
| * This snippet fixes the SKU search to prioritize exact matches first, | |
| * then SKUs starting with the search term, then partial matches. | |
| * | |
| * Copy this entire code into Code Snippets plugin | |
| */ | |
| add_filter( 'wwof_search_post_clauses_request', 'wwof_sku_search_relevance_ordering', 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
| /** | |
| * Push wholesale user data to Google Tag Manager data layer | |
| */ | |
| function wws_push_user_data_to_datalayer() { | |
| // Only run on frontend | |
| if ( is_admin() ) { | |
| return; | |
| } |
NewerOlder