1. Home
  2. WooCommerce Shipping Calculator
  3. Developer Documentation

Template functions

The WooCommerce Shipping Calculator plugin contains the following template functions.


This function outputs the shipping calculator.
This function should be used directly on your child theme template file.

// Display the shipping calculator.


Verifies if the shipping calculator is being loaded using AJAX.

// Verifies if the shipping calculator is being loaded using AJAX.
if ( wsc_load_using_ajax() ) {
    // Do something.


Verifies if the current page is the product page where the shipping calculator is shown.

// Verify if we are on a page where the shipping calculator can be used.
if ( wsc_is_shipping_calculator() {
    // Do something.


Verifies if it is an ajax call made by the shipping calculator on the product page.

// Verify if the AJAX call was made by the shipping calculator.
if ( wsc_is_shipping_calculator_ajax_call() {
    // Do something.


Gets a plugin setting.

// Gets the chosen position defined on the admin settings area.
$position = wsc_get_setting( 'position' );

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.