Tag: hook

  • woocommerce_coupon_discount_types

    Intercept the coupon types and do what you will, add or remove as you see fit.

    [php]
    <?php
    function webdav_newcoupon_type ($discount_types) {
    // Custom Code here
    return $discount_types;
    }

    add_filter (‘woocommerce_coupon_discount_types’, ‘webdav_newcoupon_type’, 10, 1);
    ?>
    [/php]

  • get_product_search_form

    The filter used for intercepting the default WooCommerce product search form. Assigning a new function to this filter allows the search form to be redesigned to specific requirements

    [php]<?php

    function webdav_get_product_search_form () {
    // Insert custom code here
    $output = ”; // function should return html code in a string
    return $output;
    }

    add_filter (‘get_product_search_form’, ‘webdav_get_product_search_form’, 10, 1);
    ?>[/php]