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' ); | |
| ?> |
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
| remove_filter( 'woocommerce_short_description', 'custom_callback', 10 ); |
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
| remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 ); |
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
| add_filter( $hook_name, $callback_function, $priority, $args ); |
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
| add_filter( 'woocommerce_short_description', 'plugin_republic_short_description', 5 ); | |
| function plugin_republic_short_description( $short_description ) { | |
| $short_description = sprintf( | |
| '%s<p>Special offer!</p>', | |
| $short_description | |
| ); | |
| return $short_description; | |
| } |
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
| add_action( $hook_name, $callback_function, $priority, $args ); |
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
| add_action( 'woocommerce_single_product_summary', 'plugin_republic_single_product_summary', 5 ); | |
| function woocommerce_template_single_title() { | |
| echo 'Our content goes here'; | |
| } |
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
| $short_description = apply_filters( 'woocommerce_short_description', $post->post_excerpt ); |
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
| do_action( 'woocommerce_single_product_summary' ); |