Title: lbwdev's Replies | WordPress.org

---

# lbwdev

  [  ](https://wordpress.org/support/users/lbwdev/)

 *   [Profile](https://wordpress.org/support/users/lbwdev/)
 *   [Topics Started](https://wordpress.org/support/users/lbwdev/topics/)
 *   [Replies Created](https://wordpress.org/support/users/lbwdev/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/lbwdev/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/lbwdev/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/lbwdev/engagements/)
 *   [Favorites](https://wordpress.org/support/users/lbwdev/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Code Snippets] Elementor Pro Code Snippet](https://wordpress.org/support/topic/elementor-pro-code-snippet/)
 *  Thread Starter [lbwdev](https://wordpress.org/support/users/lbwdev/)
 * (@lbwdev)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/elementor-pro-code-snippet/#post-14856881)
 * I can’t seem to get it to work – can you confirm the code is correct is this 
   line supposed to be blank in the commas? $output = ”;
 * When i add this to the snippet nothing shows up when i put the shortcode [single_product_summary]
 * I replaced the output section on the original snippet with the code supplied 
   above. can you let me know if that was the correct thing to do?
 * I replaced this section:
 * // 3. Display RRP field @ single product page
 * add_action( ‘woocommerce_single_product_summary’, ‘bbloomer_display_RRP’, 9 );
 * function bbloomer_display_RRP() {
    global $product; if ( $product->get_type()
   <> ‘variable’ && $rrp = get_post_meta( $product->get_id(), ‘rrp’, true ) ) { 
   echo ‘<div class=”woocommerce_rrp”>’; _e( ‘RRP: ‘, ‘woocommerce’ ); echo ‘<span
   >’ . wc_price( $rrp ) . ‘</span>’; echo ‘</div>’; } }`
 * With this code:
    add_shortcode( ‘single_product_summary’, function () { global
   $product; $output = ”;
 *  if ( $product && $product->get_type() <> ‘variable’ && $rrp = get_post_meta(
   $product->get_id(), ‘rrp’, true ) ) {
    $output .= ‘<div class=”woocommerce_rrp”
   >’; $output .= __( ‘RRP: ‘, ‘woocommerce’ ); $output .= ‘<span>’ . wc_price( 
   $rrp ) . ‘</span>’; $output .= ‘</div>’; }
 *  return $output;
    } );`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Code Snippets] Elementor Pro Code Snippet](https://wordpress.org/support/topic/elementor-pro-code-snippet/)
 *  Thread Starter [lbwdev](https://wordpress.org/support/users/lbwdev/)
 * (@lbwdev)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/elementor-pro-code-snippet/#post-14853185)
 * Thank you. When i want to then use the short code what do i put as the shortcode
   on the page? eg [shortcode] i’m not sure what text goes there

Viewing 2 replies - 1 through 2 (of 2 total)