block-editor-settings.php
4 years ago
sidebar.php
4 years ago
templates-filters.php
3 years ago
utils.php
4 years ago
woocommerce-basic.php
4 years ago
utils.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | function kubio_has_kubio_woocommerce_support() { |
| 5 | return apply_filters( 'kubio/woocommerce/has-kubio-specific-support', current_theme_supports( 'kubio-woocommerce' ) ); |
| 6 | } |
| 7 | |
| 8 | |
| 9 | function kubio_get_woocommerce_content() { |
| 10 | |
| 11 | if ( is_single() ) { |
| 12 | |
| 13 | return WC_Shortcodes::product_page( |
| 14 | array( |
| 15 | 'id' => get_the_ID(), |
| 16 | 'show_title' => 0, |
| 17 | 'status' => 'any', |
| 18 | ) |
| 19 | ); |
| 20 | } |
| 21 | |
| 22 | ob_start(); |
| 23 | add_filter( 'woocommerce_show_page_title', '__return_false' ); |
| 24 | woocommerce_content(); |
| 25 | |
| 26 | return ob_get_clean(); |
| 27 | } |
| 28 |