This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Hook: woocommerce_dropdown_variation_attribute_options_args. | |
| * Modify the parameters for the variation attributes. | |
| */ | |
| function plugin_republic_dropdown_variation_attribute_options_args( $args ) { | |
| // Modify the $args HTML here | |
| return $args; | |
| } | |
| add_filter( 'woocommerce_dropdown_variation_attribute_options_args', 'plugin_republic_dropdown_variation_attribute_options_args', 10, 1 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Hook: woocommerce_short_description. | |
| * Modify the HTML for the short description. | |
| */ | |
| function plugin_republic_short_description( $short_description ) { | |
| // Modify the $short_description HTML here | |
| return $short_description; | |
| } | |
| add_filter( 'woocommerce_short_description', 'plugin_republic_short_description', 10, 1 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Hook: woocommerce_get_price_html. | |
| * Modify the HTML for the product price. | |
| */ | |
| function plugin_republic_get_price_html( $price, $product ) { | |
| // Modify the $price HTML here | |
| return $price; | |
| } | |
| add_filter( 'woocommerce_get_price_html', 'plugin_republic_get_price_html', 10, 2 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Hook: woocommerce_product_get_rating_html. | |
| * Modify the HTML for the product rating. | |
| */ | |
| function plugin_republic_product_get_rating_html( $html, $rating, $count ) { | |
| // Modify the $html here | |
| return $html; | |
| } | |
| add_filter( 'woocommerce_product_get_rating_html', 'plugin_republic_product_get_rating_html', 10, 3 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Hook: the_title. | |
| * Modify the product name. | |
| */ | |
| function plugin_republic_the_title( $product_name, $product_id ) { | |
| // Modify the $product_name here | |
| return $product_name; | |
| } | |
| add_filter( 'the_title', 'plugin_republic_the_title', 10, 2 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Hook: woocommerce_sale_flash. | |
| * Update the HTML for the Sale! flash. | |
| */ | |
| function plugin_republic_sale_flash( $html, $post, $product ) { | |
| // Modify the $html here | |
| return $html; | |
| } | |
| add_filter( 'woocommerce_sale_flash', 'plugin_republic_sale_flash', 10, 3 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Hook: plugin_republic_product_thumbnails_columns. | |
| * Filter the number of columns in the thumbnail gallery. | |
| */ | |
| function plugin_republic_product_thumbnails_columns( $cols ) { | |
| $cols = 3; | |
| return $cols; | |
| } | |
| add_filter( 'woocommerce_product_thumbnails_columns', 'plugin_republic_product_thumbnails_columns' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Hook: woocommerce_single_product_image_thumbnail_html. | |
| */ | |
| function plugin_republic_single_product_image_thumbnail_html( $html, $attachment_id ) { | |
| // Modify $html here | |
| return $html; | |
| } | |
| add_filter( 'woocommerce_single_product_image_thumbnail_html', 'plugin_republic_single_product_image_thumbnail_html', 10, 2 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Hook: woocommerce_single_product_image_gallery_classes. | |
| * Example usage: filter classes for image gallery | |
| */ | |
| function plugin_republic_single_product_image_gallery_classes( $classes ) { | |
| $classes[] = 'extra-class'; | |
| return $classes; | |
| } | |
| add_filter( 'woocommerce_single_product_image_gallery_classes', 'plugin_republic_single_product_image_gallery_classes' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Hook: woocommerce_before_single_product. | |
| * | |
| * @hooked woocommerce_output_all_notices - 10 | |
| * add_action( 'woocommerce_before_single_product', 'woocommerce_output_all_notices', 10 ); | |
| */ | |
| do_action( 'woocommerce_before_single_product' ); | |
| ?> |