WPC Product Bundles for WooCommerce Shortcodes

Below, you’ll find a detailed guide on how to add the WPC Product Bundles for WooCommerce Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the WPC Product Bundles for WooCommerce Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the WPC Product Bundles for WooCommerce Plugin and the shortcodes it provides:

Plugin Icon
WPC Product Bundles for WooCommerce

"WPC Product Bundles for WooCommerce is a powerful plugin that allows you to effortlessly create and sell product bundles on your WooCommerce store, enhancing customer shopping experience."

★★★★✩ (200) Active Installs: 20000+ Tested with: 6.3.2 PHP Version: false
Included Shortcodes:
  • [woosb_form]
  • [woosb_bundled]
  • [woosb_bundles]

WPC Product Bundles for WooCommerce [woosb_form] Shortcode

The Woo Product Bundle shortcode is a PHP function that initiates the add-to-cart functionality. It captures the output into a buffer, then clears it for a clean return.

Shortcode: [woosb_form]

Examples and Usage

Basic example – The simple usage of this shortcode is to call the ‘woosb_form’ function without any parameters. This will display the default form created by the ‘add_to_cart_form’ function.

[woosb_form]

PHP Function Code

In case you have difficulties debugging what causing issues with [woosb_form] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'woosb_form', [ $this, 'shortcode_form' ] );

Shortcode PHP function:

function shortcode_form() {
			ob_start();
			self::add_to_cart_form();

			return ob_get_clean();
		}

Code file location:

woo-product-bundle/woo-product-bundle/includes/class-woosb.php

WPC Product Bundles for WooCommerce [woosb_bundled] Shortcode

The WooProduct Bundle shortcode is a powerful tool for displaying bundled products on your WordPress site. This shortcode initiates the ‘shortcode_bundled’ function, which calls the ‘show_bundled’ function. The output is then stored and returned for display. This allows you to showcase your product bundles efficiently.

Shortcode: [woosb_bundled]

Examples and Usage

Basic example – A simple usage of the ‘woosb_bundled’ shortcode without any parameters. This will display the bundled products as defined in the WooCommerce settings.

[woosb_bundled /]

PHP Function Code

In case you have difficulties debugging what causing issues with [woosb_bundled] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'woosb_bundled', [ $this, 'shortcode_bundled' ] );

Shortcode PHP function:

function shortcode_bundled() {
			ob_start();
			self::show_bundled();

			return ob_get_clean();
		}

Code file location:

woo-product-bundle/woo-product-bundle/includes/class-woosb.php

WPC Product Bundles for WooCommerce [woosb_bundles] Shortcode

The ‘woosb_bundles’ shortcode is a key feature of the Woo-Product-Bundle plugin. It initiates the ‘shortcode_bundles’ function, which displays all product bundles on your page.

Shortcode: [woosb_bundles]

Examples and Usage

Basic example – A simple usage of the ‘woosb_bundles’ shortcode to display product bundles on your WordPress site.

[woosb_bundles /]

PHP Function Code

In case you have difficulties debugging what causing issues with [woosb_bundles] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'woosb_bundles', [ $this, 'shortcode_bundles' ] );

Shortcode PHP function:

function shortcode_bundles() {
			ob_start();
			self::show_bundles();

			return ob_get_clean();
		}

Code file location:

woo-product-bundle/woo-product-bundle/includes/class-woosb.php

Conclusion

Now that you’ve learned how to embed the WPC Product Bundles for WooCommerce Plugin shortcodes, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *