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 Google Merchant Center Integration | |
| * | |
| * This code provides the missing functionality to retrieve vendor shipping data | |
| * from a product object for Google Merchant Center feed generation. | |
| */ | |
| /** | |
| * Get vendor ID from a WooCommerce product object |
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
| // ============================================================================== | |
| // LPFW Percentage Limit - Limit Points Redemption to Percentage of Cart Value | |
| // ============================================================================== | |
| add_action('admin_footer', function() { | |
| $screen = get_current_screen(); | |
| if (!$screen || (strpos($screen->id, 'woocommerce') === false && strpos($screen->id, 'acfw') === false)) { | |
| return; | |
| } | |
| ?> | |
| <script type="text/javascript"> |
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
| /** | |
| * Username Field | |
| * Description: Adds a username field to WC Vendors Signup and uses it when creating the user. | |
| */ | |
| defined( 'ABSPATH' ) || exit; | |
| add_filter( 'wcv_signup_form_config', function( $config ) { | |
| $config = is_array( $config ) ? $config : array(); |
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 vendor header on Elementor single product template. | |
| */ | |
| add_action( 'wp_footer', 'wcv_elementor_js_vendor_header' ); | |
| function wcv_elementor_js_vendor_header() { | |
| if ( ! function_exists( 'is_plugin_active' ) ) { | |
| include_once ABSPATH . 'wp-admin/includes/plugin.php'; | |
| } |
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 - Regenerate Missing Vendor Orders | |
| * | |
| * This script regenerates missing vendor sub-orders for cases where: | |
| * - Products were initially published under Administrator | |
| * - Product author was later corrected to vendor | |
| * - Commission was recalculated but vendor orders are missing from Orders menu | |
| * | |
| * IMPORTANT: |
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
| // Helper function to log to WooCommerce status log | |
| function wcv_log_to_wc_status( $message, $level = 'info' ) { | |
| if ( function_exists( 'wc_get_logger' ) ) { | |
| $logger = wc_get_logger(); | |
| $logger->log( $level, $message, array( 'source' => 'wcv-import-improvements' ) ); | |
| } | |
| // Also log to WordPress error log for backup | |
| error_log( '[WCV Import] ' . $message ); | |
| } |
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
| /** | |
| * Ensure Checkout Block respects wholesale payment method order by setting | |
| * the paymentMethodSortOrder asset data early. | |
| */ | |
| add_action( 'woocommerce_blocks_checkout_enqueue_data', function () { | |
| // Wholesale check via WooCommerce Wholesale Prices Premium | |
| global $wc_wholesale_prices_premium; | |
| $user_wholesale_role = ''; | |
| if ( | |
| isset( $wc_wholesale_prices_premium ) && |
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
| /** | |
| * Reorder payment gateways for wholesale customers only. | |
| */ | |
| add_filter( 'woocommerce_available_payment_gateways', function ( $gateways ) { | |
| // Apply only during checkout, including AJAX and REST requests used by Checkout/Blocks. | |
| if ( | |
| function_exists( 'is_checkout' ) | |
| && ! is_checkout() | |
| && ! ( function_exists( 'wp_doing_ajax' ) && wp_doing_ajax() ) | |
| && ! ( defined( 'REST_REQUEST' ) && REST_REQUEST ) |
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( 'wp_head', 'wcv_bank_fields_2_column_reorder' ); | |
| function wcv_bank_fields_2_column_reorder() { | |
| // Only load on vendor dashboard pages | |
| if ( ! is_user_logged_in() ) return; | |
| ?> | |
| <style type="text/css"> | |
| /* Create 2-column layout for bank fields */ | |
| .wcv-payment-tab, | |
| [class*="payment"] form, |
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
| import React, { useEffect, useState } from 'react'; | |
| import { motion, useScroll, useTransform } from 'framer-motion'; | |
| export default function Transforming() { | |
| const { scrollYProgress } = useScroll(); | |
| const [isAnimated, setIsAnimated] = useState(false); | |
| // Track scroll progress and toggle animation based on scroll position | |
| useEffect(() => { | |
| const unsubscribe = scrollYProgress.onChange((latest) => { |
NewerOlder