Button Winkelmand aanpassen

/** * MB: * Replace button text cart. */ add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘woo_custom_cart_button_text’ ); // 2.1 + function woo_custom_cart_button_text() { return __( ‘In winkelwagen’, ‘woocommerce’ ); } add_filter( ‘woocommerce_product_add_to_cart_text’, ‘woo_archive_custom_cart_button_text’ ); // 2.1 + function woo_archive_custom_cart_button_text() { return __( ‘In winkelwagen’,…Continue reading

Bestelnotities aanpassen

// Bestelnotities aanpassen add_filter( ‘woocommerce_checkout_fields’ , ‘theme_override_checkout_notes_fields’ ); // Our hooked in function – $fields is passed via the filter! function theme_override_checkout_notes_fields( $fields ) { $fields[‘order’][‘order_comments’][‘placeholder’] = ‘Opmerkingen over je bestelling…’; $fields[‘order’][‘order_comments’][‘label’] = ‘Opmerkingen’; return $fields; }Continue reading

Quantity input fields for simple products

/** * Override loop template and show quantities next to add to cart buttons */ add_filter( ‘woocommerce_loop_add_to_cart_link’, ‘quantity_inputs_for_woocommerce_loop_add_to_cart_link’, 10, 2 ); function quantity_inputs_for_woocommerce_loop_add_to_cart_link( $html, $product ) { if ( $product && $product->is_type( ‘simple’ ) && $product->is_purchasable() && $product->is_in_stock() && !…Continue reading

Tekst sale_badge

add_filter( ‘woocommerce_sale_flash’, ‘ts_rename_sale_badge’, 10 ); function ts_rename_sale_badge() { return ‘Sale!‘; }Continue reading

Set max-video-preview to 0

add_filter( ‘aioseo_robots_meta’, ‘aioseo_filter_robots_meta’ ); function aioseo_filter_robots_meta( $attributes ) { $attributes[‘max-video-preview’] = ‘max-video-preview: 0’; return $attributes; }Continue reading

Add CPTs for Typesense

function cm_typesense_add_available_post_types( $available_post_types ) { //Edit, delete or add according to your information $available_post_types[‘docs’] = [ ‘label’ => ‘Documentation’, ‘value’ => ‘docs’ ]; $available_post_types[‘actualites’] = [ ‘label’ => ‘Actualités’, ‘value’ => ‘actualites’ ]; $available_post_types[‘notes_versions’] = [ ‘label’ => ‘Notes de…Continue reading

Hide unnecessary roles

add_filter( ‘editable_roles’, function( $roles ) { if (!current_user_can(‘administrator’) && !is_admin()) { unset( $roles[‘administrator’] ); } unset( $roles[‘editor’] ); unset( $roles[‘subscriber’] ); unset( $roles[‘revisor’] ); unset( $roles[‘docspress_manager’] ); unset( $roles[‘author’] ); unset( $roles[‘contributor’] ); return $roles; } );Continue reading

WP Simple Pay: Custom Smart Tags for Fee Recovery and Subtotal Amounts

/** * Plugin Name: WP Simple Pay – Custom Smart Tags */ add_filter( ‘simpay_payment_details_template_tags’, function( $smart_tags ) { $smart_tags[] = ‘fee-recovery-amount’; $smart_tags[] = ‘pre-fee-amount’; return $smart_tags; } ); add_filter( ‘simpay_payment_confirmation_template_tag_fee-recovery-amount’, function( $value, $payment_confirmation_data ) { $object = current( $payment_confirmation_data[‘paymentintents’] );…Continue reading

Remove duplicate meta description

function remove_hello_elementor_description_meta_tag() { remove_action( ‘wp_head’, ‘hello_elementor_add_description_meta_tag’ ); } add_action( ‘after_setup_theme’, ‘remove_hello_elementor_description_meta_tag’ );Continue reading