before_registration_form- Location:
includes/class-wwlc-shortcode.php:298 - Parameters:
$registration_form_fields(array)
- Location:
- Description: Fires before the registration form is rendered
| /* By Tanvir Hasan WC Vendors to disable the burger menu from the vendor dashboard */ | |
| /** | |
| * JavaScript to DISABLE burger menu completely, show all items, | |
| * AND center-align the navigation to prevent flickering | |
| */ | |
| function wcv_disable_burger_menu() { | |
| // Only run on dashboard pages | |
| if ( ! function_exists( 'wcv_is_dashboard_page' ) || ! wcv_is_dashboard_page() ) { |
| define( 'WWPP_B2C_ONLY_CATEGORY_ID', 123 ); // Change this to your category ID | |
| /** | |
| * Option 2: Use category slug (alternative) | |
| * Uncomment and set the slug if you prefer using slug instead of ID | |
| */ | |
| // define( 'WWPP_B2C_ONLY_CATEGORY_SLUG', 'your-category-slug' ); | |
| /** | |
| * Get the B2C-only category ID |
| /** | |
| * Fix for WWOF product sorting duplication issue | |
| * This ensures the product list container is cleared before new products are added | |
| */ | |
| add_action( 'wp_footer', function() { | |
| if ( is_page() || is_singular() ) { | |
| ?> | |
| <script type="text/javascript"> | |
| jQuery(document).ready(function($) { | |
| // Monitor for product list updates |
| /* Make the UL act like a grid container */ | |
| ul.wcv_vendorslist.grid{ | |
| display: grid !important; | |
| grid-template-columns: repeat(6, minmax(0, 1fr)); | |
| gap: 24px; | |
| margin: 0 0 20px 0; | |
| padding: 0; | |
| list-style: none; | |
| } |
| /** | |
| * Oz Robotics product gallery | |
| * Vertical thumbnails with scroll arrows | |
| */ | |
| add_action( 'wp_head', 'oz_gallery_thumbs_styles' ); | |
| function oz_gallery_thumbs_styles() { | |
| if ( ! function_exists( 'is_product' ) || ! is_product() ) { |
| /** | |
| * JavaScript to DISABLE burger menu completely - show all items in main bar | |
| * This prevents any items from being moved to the burger menu | |
| */ | |
| function wcv_disable_burger_menu() { | |
| // Only run on dashboard pages | |
| if ( ! function_exists( 'wcv_is_dashboard_page' ) || ! wcv_is_dashboard_page() ) { | |
| return; | |
| } | |
| ?> |
| <?php | |
| /** | |
| * Workaround for BOGO Coupon Not Working with Regular Coupons | |
| * | |
| * This snippet fixes the issue where BOGO coupons don't apply correctly | |
| * when a regular WooCommerce coupon is already in the cart. | |
| * | |
| * DO NOT MODIFY PLUGIN CORE FILES | |
| * Add this to your theme's functions.php or a custom plugin | |
| * |
| function wwpp_add_wholesale_price_export_columns( $columns ) { | |
| // Check if wholesale prices plugin is active | |
| if ( ! class_exists( 'WWP_Wholesale_Prices' ) ) { | |
| return $columns; | |
| } | |
| // ============================================ | |
| // CUSTOMIZE THIS: Set your wholesale role key | |
| // ============================================ |