Wc Frontend Manager Shortcodes

Below, you’ll find a detailed guide on how to add the Wc Frontend Manager 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 Wc Frontend Manager Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the Wc Frontend Manager Plugin and the shortcodes it provides:

Plugin Icon
WCFM – Frontend Manager for WooCommerce along with Bookings Subscription Listings Compatible

"WCFM – Frontend Manager for WooCommerce is a powerful plugin that enables seamless management of bookings, subscriptions, and listings right from your WooCommerce frontend. Get organized with wc-frontend-manager."

★★★★✩ (247) Active Installs: 30000+ Tested with: 6.3.2 PHP Version: 5.6
Included Shortcodes:
  • [wc_frontend_manager]
  • [wcfm]
  • [wcfm_notifications]
  • [wcfm_enquiry]
  • [wcfm_policy]
  • [wcfm_follow]

Wc Frontend Manager [wc_frontend_manager] Shortcode

The ‘wc_frontend_manager’ shortcode is a part of the WC Frontend Manager plugin. It’s designed to manage WooCommerce’s frontend, ensuring smooth user interaction. This shortcode prevents caching on the frontend, maintaining live, up-to-date content. It achieves this by invoking the ‘nocache’ function and utilizing the ‘wc_nocache_headers’ function. Furthermore, it loads the ‘wc-frontend-manager’ class and wraps the output within a shortcode, allowing easy integration into your site. It’s a vital tool for efficient frontend management.

Shortcode: [wc_frontend_manager]

Examples and Usage

Basic example – A simple usage of the wc_frontend_manager shortcode to display the WooCommerce Frontend Manager.

[wc_frontend_manager /]

PHP Function Code

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

Shortcode line:

add_shortcode('wc_frontend_manager', array(&$this, 'wc_frontend_manager'));

Shortcode PHP function:

function wc_frontend_manager($attr) {
		global $WCFM;
		$WCFM->nocache();
		
		wc_nocache_headers();
		
		$this->load_class('wc-frontend-manager');
		return $this->shortcode_wrapper( array('WCFM_Frontend_Manager_Shortcode', 'output'), $attr );
	}

Code file location:

wc-frontend-manager/wc-frontend-manager/core/class-wcfm-shortcode.php

Wc Frontend Manager [wcfm] Shortcode

The WCFM plugin shortcode is a functional tool that manages endpoints. It integrates the ‘wcfm’ shortcode, which triggers the ‘wcfm_endpoint_shortcode’ function. This function globally declares the WCFM, WP, and WCFM_Query variables. It then loads the ‘endpoint’ class and finally returns the ‘output’ of the WCFM_Endpoint_Shortcode.

Shortcode: [wcfm]

Examples and Usage

Basic example – The basic usage of the ‘wcfm’ shortcode allows you to target a specific endpoint in the wc-frontend-manager plugin. This is useful when you want to display specific content or functionalities on your WordPress site.

[wcfm endpoint="dashboard" /]

PHP Function Code

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

Shortcode line:

add_shortcode('wcfm', array(&$this, 'wcfm_endpoint_shortcode'));

Shortcode PHP function:

function wcfm_endpoint_shortcode( $attr ) {
		global $WCFM, $wp, $WCFM_Query;
		$this->load_class('endpoint');
		return $this->shortcode_wrapper( array('WCFM_Endpoint_Shortcode', 'output'), $attr );
	}

Code file location:

wc-frontend-manager/wc-frontend-manager/core/class-wcfm-shortcode.php

Wc Frontend Manager [wcfm_notifications] Shortcode

The WCFM Notifications shortcode is a functional piece of code that enables notifications within the WooCommerce Frontend Manager. It globally integrates with WCFM, WP, and WCFM_Query, loading the ‘notification’ class. This shortcode runs the ‘output’ function from the ‘WCFM_Notification_Shortcode’ class, returning the results. It’s a convenient tool for managing frontend notifications in WooCommerce.

Shortcode: [wcfm_notifications]

Examples and Usage

Basic example – A simple usage of the ‘wcfm_notifications’ shortcode without any additional attributes. This will display the default notifications as defined in the WCFM plugin.

[wcfm_notifications /]

PHP Function Code

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

Shortcode line:

add_shortcode('wcfm_notifications', array(&$this, 'wcfm_notifications_shortcode'));

Shortcode PHP function:

function wcfm_notifications_shortcode( $attr ) {
		global $WCFM, $wp, $WCFM_Query;
		$this->load_class('notification');
		return $this->shortcode_wrapper( array('WCFM_Notification_Shortcode', 'output'), $attr );
	}

Code file location:

wc-frontend-manager/wc-frontend-manager/core/class-wcfm-shortcode.php

Wc Frontend Manager [wcfm_enquiry] Shortcode

The ‘wcfm_enquiry’ shortcode is part of the wc-frontend-manager plugin. The shortcode triggers the ‘wcfm_enquiry_shortcode’ function when used. This function loads the ‘enquiry’ class and returns the output from the ‘WCFM_Enquiry_Shortcode’ class. The function is global, meaning it can be used anywhere within your WordPress site.

Shortcode: [wcfm_enquiry]

Examples and Usage

Basic example – The basic usage of the ‘wcfm_enquiry’ shortcode would be to include it in the post or page content without any additional parameters. This will load the default enquiry form.

[wcfm_enquiry /]

PHP Function Code

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

Shortcode line:

add_shortcode('wcfm_enquiry', array(&$this, 'wcfm_enquiry_shortcode'));

Shortcode PHP function:

function wcfm_enquiry_shortcode( $attr ) {
		global $WCFM;
		
		//if( !is_product() && ( function_exists( 'wcfmmp_is_store_page' ) && !wcfmmp_is_store_page() ) ) return;
		
		$this->load_class('enquiry');
		return $this->shortcode_wrapper( array('WCFM_Enquiry_Shortcode', 'output'), $attr);
	}

Code file location:

wc-frontend-manager/wc-frontend-manager/core/class-wcfm-shortcode.php

Wc Frontend Manager [wcfm_policy] Shortcode

The WCFM Policy shortcode is a powerful tool within the wc-frontend-manager plugin. It allows you to display specific policy information on your WooCommerce store page. This shortcode works by calling the ‘wcfm_policy_shortcode’ function. This function then loads the ‘policy’ class and wraps it within the shortcode wrapper. The output is determined by the attributes passed.

Shortcode: [wcfm_policy]

Examples and Usage

Basic example – This example illustrates the basic usage of the ‘wcfm_policy’ shortcode. The shortcode is used without any additional attributes or parameters.

[wcfm_policy /]

PHP Function Code

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

Shortcode line:

add_shortcode('wcfm_policy', array(&$this, 'wcfm_policy_shortcode'));

Shortcode PHP function:

function wcfm_policy_shortcode( $attr ) {
		global $WCFM;
		
		//if( !is_product() && ( function_exists( 'wcfmmp_is_store_page' ) && !wcfmmp_is_store_page() ) ) return;
		
		$this->load_class('policy');
		return $this->shortcode_wrapper( array('WCFM_Policy_Shortcode', 'output'), $attr);
	}

Code file location:

wc-frontend-manager/wc-frontend-manager/core/class-wcfm-shortcode.php

Wc Frontend Manager [wcfm_follow] Shortcode

The WCFM Follow shortcode is a powerful tool that enables you to add a follow feature to your site. This shortcode calls the ‘follow’ class within the WCFM plugin. This function loads the ‘follow’ class, then wraps it with the ‘output’ function from the WCFM_Follow_Shortcode class. The output is then returned, allowing users to follow specific content or authors on your site.

Shortcode: [wcfm_follow]

Examples and Usage

Basic example – A simple usage of the ‘wcfm_follow’ shortcode without any attributes. This will display the follow button if the WCFM Follow module is enabled.

[wcfm_follow]

PHP Function Code

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

Shortcode line:

add_shortcode('wcfm_follow', array(&$this, 'wcfm_follow_shortcode'));

Shortcode PHP function:

function wcfm_follow_shortcode( $attr ) {
		global $WCFM;
		$this->load_class('follow');
		return $this->shortcode_wrapper( array('WCFM_Follow_Shortcode', 'output'), $attr);
	}

Code file location:

wc-frontend-manager/wc-frontend-manager/core/class-wcfm-shortcode.php

Conclusion

Now that you’ve learned how to embed the Wc Frontend Manager 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 *