function mycode_hide_attributes_from_additional_info_tabs( $attributes, $product ) { /** * Array of attributes to hide from the Additional Information * tab on single WooCommerce product pages. */ $hidden_attributes = [ ‘pa_kleur’, ‘pa_maat’, ‘pa_lengtemaat’, ‘pa_filter-color’, ‘pa_taillemaat’, ‘pa_merk’ ]; foreach ( $hidden_attributes as $hidden_attribute…Continue reading
add_action( ‘wp_body_open’, ‘toon_winkelmededeling_banner’ ); function toon_winkelmededeling_banner() { $tekst = get_field( ‘winkelmededeling_tekst’, ‘option’ ); $link = get_field( ‘winkelmededeling_link’, ‘option’ ); $start_datum = get_field( ‘winkelmededeling_start’, ‘option’ ); $start_tijd = get_field( ‘winkelmededeling_starttijd’, ‘option’ ); $eind_datum = get_field( ‘winkelmededeling_einde’, ‘option’ ); $eind_tijd = get_field(…Continue reading
// ============================================================================ // Gravity Forms: vul keuzelijst met producten en selecteer huidig product // Filters: gform_pre_render/admin_pre_render/pre_validation/pre_submission_filter // ============================================================================ add_filter( ‘gform_pre_render’, ‘populate_product_select_with_selected’ ); add_filter( ‘gform_admin_pre_render’, ‘populate_product_select_with_selected’ ); add_filter( ‘gform_pre_validation’, ‘populate_product_select_with_selected’ ); add_filter( ‘gform_pre_submission_filter’, ‘populate_product_select_with_selected’ ); function populate_product_select_with_selected( $form ) { if(…Continue reading
add_filter( ‘woocommerce_product_get_attributes’, function( $attributes, $product ) { // Mogelijke kleur-attribuutnamen $color_keys = [ ‘pa_kleur’, ‘pa_color’ ]; // Zoek welke aanwezig is $found_key = null; foreach ( $color_keys as $key ) { if ( isset( $attributes[ $key ] ) ) {…Continue reading
// Bereken kortingspercentages function my_get_discount_percentages( $product ) { $percentages = []; if ( $product->is_type( ‘variable’ ) ) { $prices = $product->get_variation_prices( true ); foreach ( $prices[‘regular_price’] as $key_id => $regular_price ) { $sale_price = $prices[‘price’][ $key_id ]; if ( $regular_price…Continue reading
// Toon totaal spaarbedrag op basis van winkelmand in (FunnelKit) checkout function shortcode_spaar_bedrag_checkout() { // Controleer of WooCommerce actief is if ( ! function_exists( ‘WC’ ) || ! WC()->cart ) { return ”; } // FunnelKit laadt niet altijd als…Continue reading
/** * Shortcode: toon de thumbnail van de huidige WooCommerce productcategorie * * Gebruik: [category_thumbnail] */ function woocommerce_category_image_shortcode() { // Alleen uitvoeren op categorie-archieven if ( ! is_product_category() ) { return ”; // niets tonen buiten categoriepagina } global $wp_query;…Continue reading
add_filter( ‘gform_required_legend’, ‘__return_empty_string’ );Continue reading
/** * 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…Continue reading
add_filter( ‘frm_api_request_args’, ‘my_custom_frm_api_request_header’, 10, 2 ); function my_custom_frm_api_request_header( $arg_array, $args ) { if ( $args[‘url’] == ‘https://api.brevo.com/v3/contacts/’ ) { // the full url where the request is being sent $arg_array[‘headers’][‘api-key’] = ‘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’; //Replace Your-API-Key-Here with your Brevo API key }…Continue reading