/** * Fix 1: Product page — prevent WWPP from overriding the quantity input args for * WC Product Bundle child items. * * WC Product Bundles names bundled item quantity fields ‘bundle_quantity_{id}’. * We capture WC PB’s intended args…Continue reading
add_filter( ‘woocommerce_add_cart_item_data’, function( $cart_item_data, $product_id ) { $og_channel = get_post_meta( $product_id, ‘og_channel’, true ); if ( $og_channel ) { $cart_item_data[‘og_channel’] = $og_channel; } return $cart_item_data; }, 10, 2 );Continue reading
add_action( ‘gform_after_submission_5’, ‘wcv_dynamic_bol_capture’, 10, 2 ); function wcv_dynamic_bol_capture( $entry, $form ) { $order_id = null; $bol_file_url = null; foreach ( $form[‘fields’] as $field ) { $label = strtolower( trim( $field->adminLabel ?: $field->label ) ); if ( in_array( $label, array( ‘order…Continue reading
add_filter( ‘woocommerce_coupon_is_valid’, function( $valid, $coupon, $discount ) { $excluded_channels = $coupon->get_meta( ‘_excluded_og_channels’, true ); if ( empty( $excluded_channels ) ) { return $valid; } // Handle both a single stored string and a serialized array if ( ! is_array( $excluded_channels…Continue reading
add_filter( ‘woocommerce_countries_tax_or_vat’, function( $label ) { if ( ! ( is_cart() || is_checkout() ) ) { return $label; } global $wc_wholesale_prices_premium; $user_wholesale_role = $wc_wholesale_prices_premium->wwpp_wholesale_roles->getUserWholesaleRole(); if ( empty( $user_wholesale_role ) ) { return $label; } return ”; // Leave blank, or…Continue reading
/** * WWPP & Elementor: show correct wholesale prices in Elementor side cart. */ add_filter( ‘woocommerce_cart_item_price’, function ( $price_html, $cart_item, $cart_item_key ) { if ( is_cart() || is_checkout() ) { return $price_html; } global $wc_wholesale_prices_premium, $wc_wholesale_prices; if ( ! isset(…Continue reading