View Categories

Shortcode Usage

1 min read

Shortcode Usage

The WooCommerce Auto Comments plugin provides a shortcode that allows you to display the comment form anywhere on your website, not just on the My Account page.

[woocommerceautocomment]

Enabling Shortcode Support

Important: Shortcode support is disabled by default for performance reasons. You must enable it in the plugin settings before using the shortcode.

Steps to Enable Shortcode:

  1. Go to WordPress Admin → Pingback
  2. Click the “Style” tab
  3. Find the setting: “Enable shortcode usage for displaying the comment form”
  4. Check the checkbox to enable it
  5. Click “Save Changes”

Where to Use the Shortcode

📄 Pages and Posts

Add the shortcode to any page or post content in the WordPress editor:

[woocommerceautocomment]

Best for: Dedicated review pages, customer feedback sections

🎛️ Widgets

Use the shortcode in text widgets or custom HTML widgets:

[woocommerceautocomment]

Best for: Sidebars, footer areas, promotional sections

📋 Page Builders

Most page builders support shortcodes in text/HTML elements:

  • Elementor: Use Shortcode widget
  • Beaver Builder: Use HTML module
  • Divi: Use Code module
  • Visual Composer: Use Raw HTML element

🎨 Theme Templates

Add to theme files using PHP:

<?php echo do_shortcode(‘[woocommerceautocomment]’); ?>

Best for: Custom theme development, specific page templates

Shortcode Behavior

  • User Detection: Only displays for logged-in customers
  • Purchase Validation: Only shows products the customer has purchased
  • Review Filtering: Excludes products already reviewed by the customer
  • Status Respect: Honors the order status settings from General tab
  • Responsive Design: Automatically adapts to container width
  • AJAX Functionality: Full interactive form with real-time submission

Performance Considerations

Performance Impact: When shortcode support is enabled, the plugin loads its styles and scripts on all pages where the shortcode might be used. This can slightly impact page loading speed.

Best Practices:

  • Only enable shortcode support when you actually need it
  • Use the shortcode sparingly – don’t place it on every page
  • Consider using the My Account page display instead for better performance
  • Test page loading speeds after enabling shortcode support

Common Use Cases

Customer Dashboard Page

Create a custom customer dashboard that includes the review form alongside other customer information.

Thank You Page

Add the shortcode to a custom thank you page to encourage immediate feedback after purchase.

Customer Support Page

Include the review form on customer support or help pages to collect feedback during support interactions.

Email Campaign Landing Page

Create a dedicated landing page for email campaigns encouraging reviews.

Troubleshooting

Shortcode not displaying:

  • Verify shortcode support is enabled in Style settings
  • Check that the user is logged in
  • Confirm the customer has eligible purchases
  • Ensure WooCommerce is active

Styling issues:

  • The shortcode inherits the same styling as the My Account display
  • Adjust colors and fonts in the Style settings tab
  • Consider custom CSS for specific placements

Shortcode Attributes

The current shortcode does not accept any parameters or attributes. It displays the same functionality as the My Account page version with all settings applied from the admin panel.