Last active
October 25, 2017 08:36
-
-
Save kreamweb/4a8b1b664a7fe42badd7e07ae01358d4 to your computer and use it in GitHub Desktop.
[Flatsome] Fix where show the cart message inside the single product page
is necessary add <div class="col"><?php do_action( 'ywcm_show_message' ); ?></div> in
/wp-content/themes/flatsome/woocommerce/single-product/layouts/product.php
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 | |
| /** | |
| * Moves the message in the single product page | |
| * is necessary add <div class="col"><?php do_action( 'ywcm_show_message' ); ?></div> inside the | |
| * file /wp-content/themes/flatsome/woocommerce/single-product/layouts/product.php of flatsome | |
| * */ | |
| if ( defined( 'YITH_YWCM_PREMIUM' ) ) { | |
| add_action( 'template_redirect', 'ywcart_message_single_product' ); | |
| function ywcart_message_single_product() { | |
| global $YWCM_Instance; | |
| remove_action( 'woocommerce_before_single_product', array( $YWCM_Instance, 'print_message' ) ); | |
| add_action( 'ywcm_show_message', array( $YWCM_Instance, 'print_message' ) ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment