WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Action Hook in a shortcode (1 post)

  1. daileycon
    Member
    Posted 1 year ago #

    I'm using the Cart Notices extension and I want to use one of the shortcodes on the product page. Would adding this to the functions.php file work?

    add_action('woocommerce_before_single_product', 'my_function_name');

    function my_function_name() {
    echo do_shortcode('[woocommerce_cart_notice]');
    }

    I would like to embed this notice(shortcode) without editing the template file. I know there has to be a simple way to do this.
    Thanks

    http://wordpress.org/extend/plugins/woocommerce/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.