Hooks and Filters for plugin

In This Article

Hooks

How to use action hooks - Copy below code and paste in your functions.php file of theme as per your requirement.
1) ultimate_woocommerce_auction_before_bid_form 
  If you are going to add some custom text before "Bidding Form",this hook should help you.
add_action( 'ultimate_woocommerce_auction_before_bid_form', 'here_your_function_name');
function here_your_function_name() 
{   
   echo 'Some custom text here';   
}<br>
	
2) ultimate_woocommerce_auction_after_bid_form 
 If you are going to add some custom text after "Bidding Form",this hook should help you.
add_action( 'ultimate_woocommerce_auction_after_bid_form', 'here_your_function_name');
function here_your_function_name()
{   
   echo 'Some custom text here';   
}<br>
	
3) ultimate_woocommerce_auction_before_bid_button 
If you are going to add some custom text before "Bidding Button",this hook should help you.
add_action( 'ultimate_woocommerce_auction_before_bid_button', 'here_your_function_name');
function here_your_function_name()
{   
   echo 'Some custom text here';   
}<br>
	
4) ultimate_woocommerce_auction_after_bid_button 
 If you are going to add some custom text after “Bidding Button”,this hook should help you.
add_action( 'ultimate_woocommerce_auction_after_bid_button', 'here_your_function_name');
function here_your_function_name()
{   
echo 'Some custom text here';   
}<br>
	
5) ultimate_woocommerce_auction_close 
 You can use this hook while auction is closing.
add_action( 'ultimate_woocommerce_auction_close', 'here_your_function_name', 50 );
function here_your_function_name($auction_id)
{
   $product = wc_get_product($auction_id);
   //Your Custom Code here
}<br>
	
6) ultimate_woocommerce_auction_delete_bid
   You can use this hook while admin deletes bid.
add_action( 'ultimate_woocommerce_auction_delete_bid', 'here_your_function_name', 50 );
function here_your_function_name($auction_id)
{
   $product = wc_get_product($auction_id);
   //Your Custom Code here
}	<br>
	
7) ultimate_woocommerce_auction_place_bid
  Hooks use while placing bid.
add_action( 'ultimate_woocommerce_auction_place_bid', 'here_your_function_name', 50 );
function here_your_function_name($auction_id)
{
   $product = wc_get_product($auction_id);
   //Your Custom Code here
}<br>
	
8) ultimate_woocommerce_auction_started
  You can use this hook while auction is starting.
add_action( 'ultimate_woocommerce_auction_started', 'here_your_function_name', 50 );
function here_your_function_name($auction_id)
{
   $product = wc_get_product($auction_id);
   //Your Custom Code here
}
	

Filters

Add this filters in your functions.php file of theme as per your requirement.

1)ultimate_woocommerce_auction_bid_button_text 

add_filter('ultimate_woocommerce_auction_bid_button_text', 'here_your_function_name' );
function here_your_function_name(){
   return __('Button Text', 'woo_ua');
}

2)ultimate_woocommerce_auction_total_bids_heading 

add_filter('ultimate_woocommerce_auction_total_bids_heading', 'here_your_function_name1' );
function here_your_function_name1(){
   return __('Total Bids Placed:', 'woo_ua'); 		 
}

3)ultimate_woocommerce_auction_product_condition

add_filter('ultimate_woocommerce_auction_product_condition', 'here_your_function_name' );
    function here_your_function_name( $array ){
        /*
         Exiting array keys. 1)new 2)used
        */
        $array['new']='New2';
        $array['used']='Used2';
        /*
         You can Add New Condition to Auction Product Like below.
        */
        $arr2 = array('new_factory' => 'Factory Sealed Packaging');
        $arr3 = array('vintage' => 'Vintage');
        $arr4 = array('appears_new' => 'Appears New');
        $array = $array + $arr2 + $arr3 + $arr4;
        return $array;
    }

4) ultimate_woocommerce_auction_pay_now_button_text

add_filter('ultimate_woocommerce_auction_pay_now_button_text', 'here_your_function_name' );
function here_your_function_name(){
   return __('Button Text', 'woo_ua');
}

Still need help? Send Your Query Send Your Query