Filters/Actions for WooCommerce Products

Filters/Actions for WooCommerce Products

Filters / Actions available for WooCommerce Products are listed below.

Module: Woo Products

Filter: uabb_woo_out_of_stock_stringDescription: This filter will replace the 「OUT OF STOCK」 text of products from UABB woo-products grid or carousel.

// Changes the "OUT OF STOCK" message from Woo-Products module to your desired string. add_filter( 'uabb_woo_out_of_stock_string', 'change_out_of_stock_string' ); function change_out_of_stock_string ($default) { return 'Coming Soon'; //Return new string }

uabb_quick_view_title_before

Fires at the beginning of the quick view title

function quick_before_title( $post_id ) { echo '

I am at the beginning of the quick view title.

'; } add_action( 'uabb_quick_view_title_before', 'quick_before_title', 10, 2 );

uabb_quick_view_title_after

Fires at the end of the quick view title

function quick_after_title( $post_id ) { echo '

I am at the end of the quick view title.

'; } add_action( 'uabb_quick_view_title_after', 'quick_after_title', 10, 2 );

uabb_quick_view_price_before

Fires at the beginning of the quick view price

function quick_view_price_before( $post_id ) { echo '

I am at the beginnning of the quick view price.

'; } add_action( 'uabb_quick_view_price_before', 'quick_view_price_before', 10, 2 );

uabb_quick_view_price_after

Fires at the endof the quick view price

function quick_view_price_after( $post_id ) { echo '

I am at the beginnning of the quick view price.

'; } add_action( 'uabb_quick_view_price_after', 'quick_view_price_after', 10, 2 );

uabb_quick_view_rating_before

Fires at the beginning of the quick view rating

function quick_view_rating_before( $post_id ) { echo '

I am at the beginning of the quick view rating.

'; } add_action( 'uabb_quick_view_rating_before', 'quick_view_rating_before', 10, 2 );

uabb_quick_view_rating_after

Fires at the end of the quick view rating

function quick_view_rating_after( $post_id ) { echo '

I am at the end of the quick view rating.

'; } add_action( 'uabb_quick_view_rating_after', 'quick_view_rating_after', 10, 2 );

uabb_quick_view_short_description_before

Fires at the beginning of the quick view short description

function quick_view_short_description_before( $post_id ) { echo '

I am at the beginning of the quick view Short Description.

'; } add_action( 'uabb_quick_view_short_description_before', 'quick_view_short_description_before', 10, 2 );

uabb_quick_view_short_description_after

Fires at the end of the quick view short description

function quick_view_short_description_after( $post_id ) { echo '

I am at the end of the quick view Short Description.

'; } add_action( 'uabb_quick_view_short_description_after', 'quick_view_short_description_after', 10, 2 );

uabb_quick_view_add_to_cart_before

Fires at the beginning of the quick view add to cart

function quick_view_add_to_cart_before( $post_id ) { echo '

I am at the beginning of the quick view Add to cart.

'; } add_action( 'uabb_quick_view_add_to_cart_before', 'quick_view_add_to_cart_before', 10, 2 );

uabb_quick_view_add_to_cart_after

Fires at the end of the quick view add to cart

function quick_view_add_to_cart_after( $post_id ) { echo '

I am at the beginning of the quick view Add to cart.

'; } add_action( 'uabb_quick_view_add_to_cart_after', 'quick_view_add_to_cart_after', 10, 2 );

uabb_quick_view_category_before

Fires at the beginning of the quick view category

function quick_view_cat_before( $post_id ) { echo '

I am at the beginning of the quick view category before.

'; } add_action( 'uabb_quick_view_category_before', 'quick_view_cat_before', 10, 2 );

uabb_quick_view_category_after

Fires at the end of the quick view category

function quick_view_cat_after( $post_id ) { echo '

I am at the end of the quick view Category.

'; } add_action( 'uabb_quick_view_category_after', 'quick_view_cat_after', 10, 2 );

Filters / Actions for Woo Categories module

uabb_woo_category_single_product_string

Filter: uabb_woo_category_single_product_stringDescription: This filter will replace the 「Product」 text of product count from UABB woo-categories grid or carousel when there is a single product in the category.

// Changes the "Product" message from Woo-Categories module to your desired string.

add_filter( 'uabb_woo_category_single_product_string', 'change_product_string' );
function change_product_string($default) {
return 'Item'; //Return new string
}

uabb_woo_category_multiple_product_string

Filter: uabb_woo_category_multiple_product_stringDescription: This filter will replace the 「Products」 text of product count from UABB woo-categories grid or carousel when there are multiple products in the category.

// Changes the "Products" message from Woo-Categories module to your desired string.

add_filter( 'uabb_woo_category_multiple_product_string', 'change_products_string' );
function change_products_string($default) {
return 'Items'; //Return new string
}

woocommerce_before_subcategory

Fires at the beginning of the WooCommerce subcategory

function content_before_subcategory( $category ) { echo '

I am at the beginning of the Subcategory.

'; } add_action( 'woocommerce_before_subcategory', 'content_before_subcategory', 10, 2 );

woocommerce_before_subcategory_title

Fires at the beginning of the WooCommerce subcategory title

function content_before_subcategory_title( $category ) { echo '

I am at the beginning of the Subcategory title.

'; } add_action( 'woocommerce_before_subcategory_title', 'content_before_subcategory_title', 10, 2 );

woocommerce_shop_loop_subcategory_title

Fires the WooCommerce shop loop subcategory title

function woo_shop_loop_subcat_title( $category ) { echo '

I am the WooCommerce Subcategory title.

'; } add_action( 'woocommerce_shop_loop_subcategory_title', 'woo_shop_loop_subcat_title', 10, 2 );

woocommerce_after_subcategory_title

Fires at the end of the WooCommerce shop loop subcategory title

function content_after_subcategory_title( $category ) { echo '

I am at the end of the Subcategory title.

'; } add_action( 'woocommerce_after_subcategory_title', 'content_after_subcategory_title', 10, 2 );

woocommerce_after_subcategory

Fires at the end of the WooCommerce shop loop subcategory Content

function content_after_subcategory( $category ) { echo '

I am at the end of the Subcategory Content.

'; } add_action( 'woocommerce_after_subcategory', 'content_after_subcategory', 10, 2 );

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註