All Functions

Exchange/ it exchange transaction is cleared for delivery

Description

Does the given transaction have a status that warants delivery of product(s)

History

Since 0.4.2

Parameters

<?php it_exchange_transaction_is_cleared_for_delivery( $transaction ); ?>
  • mixed $transaction id or object

Returns

boolean

Exchange/clean it exchange query args

Description

Grabs the current URL, removes all registerd exchnage query_args from it

Exempts args in first paramater

Cleans additional args in second paramater

History

Since 0.4.0

Parameters

<?php clean_it_exchange_query_args( $exempt=array(), $additional=array() ); ?>
  • array $exempt optional array of query args not to clean
  • array $additional opitonal array of params to clean even if not found in register params

Returns

string

Exchange/handle it exchange customer registration action

Description

Handles $_REQUESTs and submits them to the registration for processing

History

Since 0.4.0

Parameters

<?php handle_it_exchange_customer_registration_action(); ?>

Returns

void

Exchange/handle it exchange save profile action

Description

Handles $_REQUESTs and submits them to the profile for processing

History

Since 0.4.0

Parameters

<?php handle_it_exchange_save_profile_action(); ?>

Returns

void

Exchange/it exchange accepting coupon type

Description

Are we accepting any more of the passed coupon type

We're going to ask the add-ons for this info. Default is no.

History

Since 0.4.0

Parameters

<?php it_exchange_accepting_coupon_type( $type ); ?>
  • string $type the type of coupon to check for

Returns

boolean

Exchange/it exchange add addon support

Description

Add's add-on support for a specific feature

History

Since 0.3.3

Parameters

<?php it_exchange_add_addon_support( $add_on, $feature ); ?>
  • string $add_on the slug for the add-on being targeted
  • string $feature the feature slug that needs to be enabled

Returns

void

Exchange/it exchange add cart product

Description

Inserts product into the cart session

History

Since 0.4.0

Parameters

<?php it_exchange_add_cart_product( $cart_product_id, $product ); ?>

Returns

array

Exchange/it exchange add coupon

Description

Adds a coupon post_type to WP

History

Since 0.4.0

Parameters

<?php it_exchange_add_coupon( $args=array(), $cart_object=false ); ?>
  • array $args same args passed to wp_insert_post plus any additional needed
  • object $cart_object passed cart object

Returns

mixed post id or false

Exchange/it exchange add download hash data

Description

Adds metadata associated with a transaction to the download

Doesn't work if hash already exists

History

Since 0.4.0

Parameters

<?php it_exchange_add_download_hash_data( $download_id, $hash, $hash_data ); ?>
  • integer $download_id ID of the download post
  • string $hash
  • array $hash_data

Exchange/it exchange add feature support to product type

Description

Adds support for a specific product-feature to a specific product-type

History

Since 0.3.8

Parameters

  • <?php it_exchange_add_feature_support_to_product_type( $feature_key, $product_type ); ?>
    string $feature_key the slug for the featuer
  • string $product_type the product-type slug

Returns

void

Exchange/it exchange add message

Description

Adds messages to Exchange session

History

Since 0.4.0

Parameters

<pre><?php it_exchange_add_message( $type, $message ); ?></pre>

  • string $type Type of message you want displayed
  • string $message the message you want displayed

Exchange/it exchange add product to shopping cart

Description

Adds a product to the shopping cart based on the product_id

return boolean

History

Since 0.3.7

Parameters

<?php it_exchange_add_product_to_shopping_cart( $product_id, $quantity=1 ); ?>
  • string $product_id a valid wp post id with an iThemes Exchange product post_typp
  • int $quantity (optional) how many?

Exchange/it exchange add refund to transaction

Description

Adds a refund to a transaction

History

Since 0.4.0

Parameters

<?php it_exchange_add_refund_to_transaction( $transaction, $amount, $date=false, $options=array() ); ?>
  • string $method slug for transaction_method
  • mixed $options

Exchange/it exchange add session data

Description

Adds session data to the iThemes Exchange Session.

This simply adds an item to the data array of the PHP Session.

Shopping cart plugins are responsible for managing the structure of the data

If a key is passed, it will be used as the key in the data array. Otherwise, the data array will just be

incremented. eg: ['data'][] = $data;

History

Since 0.3.7

Parameters

<?php it_exchange_add_session_data( $key, $data ); ?>
  • mixed $data data as passed by the shopping cart
  • mixed $key optional identifier for the data.

Returns

void

Exchange/it exchange add transaction

Description

Adds a transaction post_type to WP

History

Since 0.3.3

Parameters

<?php it_exchange_add_transaction( $method, $method_id, $status = 'pending', $customer_id = false, $cart_object, $args = array() ); ?>
  • array $args same args passed to wp_insert_post plus any additional needed
  • object $cart_object passed cart object

Returns

mixed post id or false

Exchange/it exchange addon supports

Description

Does the given add-on support a specific feature?

History

Since 0.3.3

Parameters

<?php it_exchange_addon_supports( $add_on, $feature ); ?>
  • string $add_on add_on slug
  • string $feature type of feature we are testing for support

Returns

bool

Exchange/it exchange apply coupon

Description

Apply a coupon

We're going to ask the add-ons to do this for us.

History

Since 0.4.0

Parameters

<?php it_exchange_apply_coupon( $type, $code, $options=array() ); ?>
  • string $type the type of coupon to check for
  • string $code the coupon code
  • array $options

Returns

boolean

Exchange/it exchange clear messages

Description

Checks if messages are in the to Exchange session

History

Since 0.4.0

Parameters

<?php it_exchange_clear_messages( $type ); ?>
  • string $type Type of message you want displayed

Exchange/it exchange clear option cache

Description

Clear the cache for a key

History

Since 0.4.0

Parameters

<?php it_exchange_clear_option_cache( $key ); ?>

Returns

void

Exchange/it exchange clear session

Description

Removes all data from the session

History

Since 0.3.7

Parameters

<?php it_exchange_clear_session( $hard=false ); ?>

Returns

boolean

Exchange/it exchange clear session data

Description

Removes all data from the session key

History

Since 0.3.7

Parameters

<?php it_exchange_clear_session_data( $key=false ); ?>

Returns

boolean

Exchange/it exchange clear transaction hash index

Description

Clear the hash index for this transaction

History

Since 0.4.0

Parameters

<?php it_exchange_clear_transaction_hash_index( $transaction ); ?>
  • mixed $transaction ID or object

Returns

boolean

Exchange/it exchange create download hash

Description

Generate a unique hash for file downloads

History

Since 0.4.0

Parameters

<?php it_exchange_create_download_hash( $download_id ); ?>
  • integer $download_id the WP post ID for the download

Returns

string the hash

Exchange/it exchange customer has transaction

Description

Returns all customer transactions

History

Since 0.4.0

Parameters

<?php it_exchange_customer_has_transaction( $transaction_id, $customer_id = NULL ); ?>
  • integer ID transaction id
  • integer ID customer id

Returns

array

Exchange/it exchange delete cart product

Description

Deletes product from the cart session

History

Since 0.4.0

Parameters

<?php it_exchange_delete_cart_product( $cart_product_id ); ?>

Returns

array

Exchange/it exchange delete hash from transaction hash index

Description

Deletes a hash from a transaction index

This function doesn't care what product its attached to. If it finds it, it deletes it.

Parameters

<?php it_exchange_delete_hash_from_transaction_hash_index( $transaction, $hash ); ?>
  • mixed $transaction the ID or object
  • string $hash the hash we're looking for

Returns

boolean

Exchange/it exchange disable addon

Description

Disable a registered add_on

History

Since 0.3.2

Parameters

<?php it_exchange_disable_addon( $add_on ); ?>
  • string $add_on add_on to disable

Returns

bool

Exchange/it exchange do confirmation redirect

Description

Redirect to confirmation page after successful transaction

History

Since 0.3.7

Parameters

<?php it_exchange_do_confirmation_redirect( $transaction_id ); ?>
  • integer $transaction_id the transaction id

Returns

void

Exchange/it exchange do transaction

Description

For processing a transaction

History

Since 0.3.7

Parameters

<?php it_exchange_do_transaction( $method, $transaction_object ); ?>

Returns

mixed

Exchange/it exchange empty shopping cart

Description

Empties the cart

History

Since 0.3.7

Parameters

<?php it_exchange_empty_shopping_cart(); ?>

Returns

boolean

Exchange/it exchange enable addon

Description

Enable a registerd add_on

History

Since 0.3.2

Parameters

<?php it_exchange_enable_addon( $add_on ); ?>
  • string $add_on add_on to enable

Returns

bool

Exchange/it exchange featured addons on top

Description

Resorts addon list from get_more_addons so featured add-ons are on top

History

Since 0.4.0

Parameters

<?php it_exchange_featured_addons_on_top( $addons ); ?>
  • array $addons Current add-on array from it_exchange_get_more_addons()

Returns

array Restorted add-ons array

Exchange/it exchange filter addons by category

Description

Takes an array of add-ons and filters by passed category

History

Since 0.3.0

Parameters

<?php it_exchange_filter_addons_by_category( $add_ons, $categories ); ?>
  • array $add_ons an array of add-ons formatted like $GLOBALS['it_exchange']['add_ons'] array
  • array $categories contains categories we want filters: array( 'cat1', 'cat2', 'etc' );

Returns 

array Filtered add-ons

Exchange/it exchange generate transaction hash

Description

Generates a unique transaction ID for receipts

History 

Since 0.4.0

Parameters 

<?php it_exchange_generate_transaction_hash( $transaction_id, $customer_id ); ?>
  • integer $transaction_id the wp_post ID for the transaction
  • interger $user_id the wp_users ID for the customer

Returns 

string

Exchange/it exchange get addon

Description

Returns a specific add-on by its slug

History

Since 0.3.2

Parameters

<?php it_exchange_get_addon( $slug ); ?>
  • string $slug the add-on's slug

Returns

array the add_on array

Exchange/it exchange get addon categories

Description

Returns an array of registered add-on categories

History

Since 0.2.0

Parameters

<?php it_exchange_get_addon_categories(); ?>

Returns

array registered add-on categories

Exchange/it exchange get addon support

Description

Return the default values for an add-on support key

History

Since 0.3.3

Parameters

<?php it_exchange_get_addon_support( $add_on, $feature ); ?>
  • string $add_on the slug for the add-on being targeted
  • string $feature the feature the slug is targeting

Returns

mixed the value of the key

Exchange/it exchange get addons

Description

Returns an array of registered add-ons

History

Since 0.2.0

Parameters 

<?php it_exchange_get_addons( $options=array() ); ?>
  • array $options For filtering by category, use $options['category'] = array( 'cat1', 'cat2', 'etc' );

Returns

array registered add-ons

Exchange/it exchange get applied coupons

Description

Return the currently applied coupons

We're going to ask the add-ons for this info. Default is no.

History

Since 0.4.0

Parameters

<?php it_exchange_get_applied_coupons( $type=false ); ?>
  • string $type the type of coupon to check for

Returns

boolean

Exchange/it exchange get cart data

Description

Returns an array of all data in the cart

History

Since 0.3.7

Parameters

<?php it_exchange_get_cart_data( $key = false ); ?>

Returns

array

Exchange/it exchange get cart description

Description

Returns the cart description

The cart description is essentailly going to be a list of all products being purchased

History

Since 0.4.0

Parameters

<?php it_exchange_get_cart_description(); ?>

Returns

mixed total of cart

Exchange/it exchange get cart nonce field

Description

Returns the nonce field for the cart

History

Since 0.4.0

Parameters

<?php it_exchange_get_cart_nonce_field(); ?>

Returns

string

Exchange/it exchange get cart product

Description

Returns a specific product from the cart.

The returned data is not an iThemes Exchange Product object. It is a cart-product

History

Since 0.3.7

Parameters

<?php it_exchange_get_cart_product( $id ); ?>
  • mixed $id id for the cart's product data

Returns

mixed

Exchange/it exchange get cart product base price

Description

Returns the base_price for the cart product

Other add-ons may modify this on the fly based on the product's itemized_data and additional_data arrays

History

Since 0.3.7

Parameters

<?php it_exchange_get_cart_product_base_price( $product, $format=true ); ?>
  • array $product cart product

Returns

integer quantity

Exchange/it exchange get cart product quantity

Description

Returns the quantity for a cart product

History

Since 0.3.7

Parameters

<?php it_exchange_get_cart_product_quantity( $product ); ?>
  • array $product cart product

Returns

integer quantity

Exchange/it exchange get cart product subtotal

Description

Returns the subtotal for a cart product

Base price multiplied by quantity and then passed through a filter

History

Since 0.3.7

Parameters

<?php it_exchange_get_cart_product_subtotal( $product, $format=true ); ?>
  • array $product cart product

Returns

mixed subtotal

Exchange/it exchange get cart product title

Description

Returns the title for a cart product

Other add-ons may need to modify the DB title to reflect variants / etc

History

Since 0.3.7

Parameters

<?php it_exchange_get_cart_product_title( $product ); ?>
  • array $product cart product

Returns 

string product title

Exchange/it exchange get cart products

Description

Returns an array of all products in the cart

History

Since 0.3.7

Parameters

<?php it_exchange_get_cart_products(); ?>

Returns

array

Exchange/it exchange get cart products count

Description

Returns the number of items in the cart (not including quantity for individual items)

History

Since 0.4.0

Parameters

<?php it_exchange_get_cart_products_count(); ?>

Returns

integer

Exchange/it exchange get cart subtotal

Description

Returns the cart subtotal

History

Since 0.3.7

Parameters

<?php it_exchange_get_cart_subtotal( $format=true ); ?>

Returns

mixed subtotal of cart

Exchange/it exchange get cart total

Description

Returns the cart total

The cart total is essentailly going to be the sub_total plus whatever motifications other add-ons make to it.

eg: taxes, shipping, discounts, etc.

History

Since 0.3.7

Parameters

<?php it_exchange_get_cart_total( $format=true ); ?>

Returns

mixed total of cart

Exchange/it exchange get coupon

Description

Retreives a coupon object by passing it the WP post object or post id

History

Since 0.4.0

Parameters

<?php it_exchange_get_coupon( $post ); ?>
  • mixed $post post object or post id

Exchange/it exchange get coupon discount label

Description

Get coupon discount label

ie: $10.00 / 10%

History

Since 0.4.0

Parameters

<?php it_exchange_get_coupon_discount_label( $coupon, $options=array() ); ?>
  • mixed $coupon id or object
  • options optional

Returns

string

Exchange/it exchange get coupon discount method

Description

Get coupon dicount method.

Will return false if coupon addon doesn't provide this data

History

Since 0.4.0

Parameters

<?php it_exchange_get_coupon_discount_method( $coupon_id, $options=array() ); ?>
  • integer $coupon_id the coupon id
  • array $options optional

Exchange/it exchange get coupon type apply field

Description

Retreive the field for applying a coupon type

We're going to ask the add-ons for this info. Default is an empty string

History

Since 0.4.0

Parameters

<?php it_exchange_get_coupon_type_apply_field( $type, $options=array() ); ?>
  • string $type the type of coupon to check for
  • array $options

Returns

boolean

Exchange/it exchange get coupon types

Description

Returns a list of all registered coupon types

History

Since 0.4.0

Parameters

<?php it_exchange_get_coupon_types(); ?>

Returns

array

Exchange/it exchange get coupons

Description

Returns a list of coupons

Options can be sent through to be used with WP's get_posts() funciton.

History

Since 0.4.0

Parameters

<?php it_exchange_get_coupons( $options=array() ); ?>

Returns

array an array of posts from our coupon post type

Exchange/it exchange get currency options

Description

Returns currency data

History

Since 0.3.4

Parameters

<?php it_exchange_get_currency_options(); ?>

Exchange/it exchange get currency symbol

Description

Returns the currency symbol based on the currency key

History

Since 0.4.0

Parameters

<?php it_exchange_get_currency_symbol( $country_code ); ?>
  • string $country_code country code for the currency

Returns

string

Exchange/it exchange get current customer

Description

Get the currently logged in customer or return false

History

Since 0.3.7

Parameters

<?php it_exchange_get_current_customer(); ?>

Returns

mixed customer data

Exchange/it exchange get current customer id

Description

Get the currently logged in customer ID or return false

History

Since 0.4.0

Parameters

<?php it_exchange_get_current_customer_id(); ?>

Returns

mixed customer data

Exchange/it exchange get customer

Description

Get a customer

Will return customer data formated by the active customer management add-on

History

Since 0.3.7

Parameters

<?php it_exchange_get_customer( $customer_id ); ?>
  • integer $customer_id id for the customer

Returns

mixed customer data

Exchange/it exchange get customer products

Description

Returns all customer products purchased across various transactions

History

Since 0.4.0

Parameters

<?php it_exchange_get_customer_products( $customer_id ); ?>
  • integer $customer_id the WP id of the customer

Returns

array

Exchange/it exchange get customer transactions

Description

Returns all customer transactions

History

Since 0.4.0

Parameters

<?php it_exchange_get_customer_transactions( $customer_id ); ?>
  • integer ID customer id

Returns

array

Exchange/it exchange get disabled addons

Description

Grabs list of currently disabled add-ons

Can optionally filter by categories

History

Since 0.4.0

Parameters

<?php it_exchange_get_disabled_addons( $options=array() ); ?>
  • array $options For filtering by category, use $options['category'] = array( 'cat1', 'cat2', 'etc' );

Returns

array Disabled add-ons

Exchange/it exchange get download data

Description

Get a requested file hash

History

Since 0.4.0

Parameters

<?php it_exchange_get_download_data( $download_id, $hash ); ?>
  • string $hash The hash holding the meta for the file

Returns

array hash data

Exchange/it exchange get download data from hash

Description

Get a requested file hash

History

Since 0.4.0

Parameters

<?php it_exchange_get_download_data_from_hash( $hash ); ?>
  • string $hash The hash holding the meta for the file

Returns

array hash data

Exchange/it exchange get download expiration date

Description

Get expire_time

History

Since 0.4.0

Parameters

<?php it_exchange_get_download_expiration_date( $hash_data, $date_format=false ); ?>
  • array $hash_data from download hash
  • string $purchase_date post_date from transaction post_type
  • string $date_foramt optional. the format to display the date in.

Returns

string

Exchange/it exchange get download expiration date from settings

Description

Convert 5 months or 30 days to date from transaction

History

Since 0.4.0

Parameters

<?php it_exchange_get_download_expiration_date_from_settings( $hash_data, $purchase_date, $date_format=false ); ?>
  • array $hash_data from download hash
  • string $purchase_date post_date from transaction post_type
  • string $date_foramt optional. the format to display the date in.

Returns

string

Exchange/it exchange get download hashes for transaction product

Description

Grabs download data for a specific transaction / product / file combination

Fourth param is opitonal.

Parameters

<?php it_exchange_get_download_hashes_for_transaction_product( $transaction, $transaction_product, $download_id ); ?>
  • mixed $transaction transaction ID or object
  • array $transaction_product this is the product array found in cart_details property in the transaction object
  • integer $download_id the id of the download attached to the product passed in param 2

Returns

mixed array of all data or a specific key

Exchange/it exchange get download info

Description

Get a requested file hash

History

Since 0.4.0

Parameters

<?php it_exchange_get_download_info( $download_id ); ?>
  • string $hash The hash holding the meta for the file

Returns

array hash data

Exchange/it exchange get enabled addons

Description

Grabs list of currently enabled add-ons

Can optionally filter by categories

History

Since 0.3.0

Parameters

<?php it_exchange_get_enabled_addons( $options=array() ); ?>
  • array $options For filtering by category, use $options['category'] = array( 'cat1', 'cat2', 'etc' );

Returns

array Enabled add-ons

Exchange/it exchange get field name

Description

Returns a field name used in links and forms

History

Since 0.4.0

Parameters

<?php it_exchange_get_field_name( $var ); ?>
  • string $var var being requested

Returns

string var used in links / forms for different actions

Exchange/it exchange get field names

Description

Returns an array of all field names registered with iThemes Exchange

History

Since 0.4.0

Parameters

<?php it_exchange_get_field_names(); ?>

Returns

array

Exchange/it exchange get gateway id for transaction

Description

Return the transaction ID provided by the gateway (transaction method)

History

Since 0.4.0

Parameters

<?php it_exchange_get_gateway_id_for_transaction( $transaction ); ?>
  • mixed $transaction ID or object

Returns

mixed

Exchange/it exchange get messages

Description

Gets messages to Exchange session

History

Since 0.4.0

Parameters

<?php it_exchange_get_messages( $type, $clear=true ); ?>
  • string $type Type of message you want displayed

Exchange/it exchange get more addons

Description

Grabs list of currently available add-ons from iThemes

Can optionally filter by categories

History

Since 0.4.0

Parameters

  • <?php it_exchange_get_more_addons( $options=array() ); ?>
    array $options For filtering by category, use $options['category'] = array( 'cat1', 'cat2', 'etc' );

Returns

array All add-ons available from iThemes

Exchange/it exchange get option

Description

Retrieve options

Default values can be set for any option by adding a filter:

- it_storage_get_defaults_$key

History

Since 0.3.6

Parameters

<?php it_exchange_get_option( $key, $break_cache=false, $merge_defaults=true ); ?>
  • string $key option key
  • boolean $break_cache clear the ITStorage2 cache before returning options?
  • boolean $merge_defaults attempt to merge with default values

Returns

mixed value of passed key

Exchange/it exchange get page id

Description

Return the ID of a specific iThemes Exchange page as set in options

Parameters

<?php it_exchange_get_page_id( $page ); ?>

Returns

integer the WordPress page id if it exists.

Exchange/it exchange get page name

Description

Get name for ghost page

History

Since 0.4.0

Parameters

<?php it_exchange_get_page_name( $page, $clear_settings_cache=false ); ?>
  • string $page page setting

Returns

string url

Exchange/it exchange get page url

Description

Get permalink for ghost page

History

Since 0.4.0

Parameters

<?php it_exchange_get_page_url( $page, $clear_settings_cache=false ); ?>
  • string $page page setting

Returns

string url

Exchange/it exchange get product

Description

Retreives a product object by passing it the WP post object or post id

History

Since 0.3.2

Parameters

<?php it_exchange_get_product( $post ); ?>
  • mixed $post post object or post id

Exchange/it exchange get product feature

Description

Get the value for a feature of a specific product

History

Since 0.3.8

Parameters

<?php it_exchange_get_product_feature( $product_id, $feature_key, $options=array() ); ?>
  • integer $product_id the WordPress post ID for the product
  • string $feature_key the slug for the feature
  • array $options

Returns

mixed the value of the feature

Exchange/it exchange get product type

Description

Grabs the product type of a product

History

Since 0.3.1

Parameters

<?php it_exchange_get_product_type( $post=false ); ?>

Returns

string the product type

Exchange/it exchange get product type name

Description

Returns the name for a registered product-type

History

Since 0.3.2

Parameters

<?php it_exchange_get_product_type_name( $product_type ); ?>
  • string $product_type slug for the product-type

Exchange/it exchange get product type options

Description

Returns the options array for a registered product-type

History

Since 0.3.2

Parameters

<?php it_exchange_get_product_type_options( $product_type ); ?>
  • string $product_type slug for the product-type

Exchange/it exchange get products

Description

Get IT_Exchange_Products

History

Since 0.3.3

Parameters

<?php it_exchange_get_products( $args=array() ); ?>

Returns

array an array of IT_Exchange_Product objects

Exchange/it exchange get registered product features

Description

Returns all registered product_features

History

Since 0.3.8

Parameters

<?php it_exchange_get_registered_product_features(); ?>

Returns

array

Exchange/it exchange get remove coupon html

Description

Generates the remove a coupon that has been applied

History

Since 0.4.0

Parameters

<?php it_exchange_get_remove_coupon_html( $type, $code, $options=array() ); ?>

Returns

string

Exchange/it exchange get session

Description

This grabs you a copy of the IT_Exchange_Session object

History

Since 0.3.3

Parameters

<?php it_exchange_get_session(); ?>

Returns

object instance of IT_Exchange_Session

Exchange/it exchange get session data

Description

Returns session_data array from current session

History

Since 0.3.3

Parameters

<?php it_exchange_get_session_data( $key=false ); ?>

Returns

array an array of session_data stored in $_SESSION['it_exchange']

Exchange/it exchange get storage

Description

Return the ITStorage object for a given key

$args options:

  • version default is 0
  • autoload default is true

History

Since 0.3.6

Parameters

<?php it_exchange_get_storage( $key, $args=array() ); ?>
  • string $key options key
  • mixed $args Either a version number (string) or an array of args passed to class constructor for ITStorage2

Returns

object instance of ITStorage2

Exchange/it exchange get the product id

Description

Returns the global for the current product's id

History

Since 0.3.8

Parameters

<?php it_exchange_get_the_product_id(); ?>

Returns

mixed product id or false

Exchange/it exchange get total coupons discount

Description

Returns the total discount for all applied coupons combined

History

Since 0.4.0

Parameters

<?php it_exchange_get_total_coupons_discount( $type=false, $options=array() ); ?>
  • string $type the type of coupon to check for
  • array $options

Exchange/it exchange get transaction

Description

Retreives a transaction object by passing it the WP post object or post id

History

Since 0.3.3

Parameters 

<?php it_exchange_get_transaction( $post ); ?>
  • mixed $post post object or post id

Exchange/it exchange get transaction confirmation url

Description

Get the confirmation URL for a transaction

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_confirmation_url( $transaction_id ); ?>
  • integer $transaction_id id of the transaction

Returns

string url

Exchange/it exchange get transaction coupon summary

Description

Returns a summary of the coupon details.

We rely on the add-on to give us this data since different add-ons may store the data different.

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_coupon_summary( $type, $transaction_coupon ); ?>
  • string $slug the slug of the add-on responsible for creating the coupon
  • mixed $transaction_coupon

Returns

string

Exchange/it exchange get transaction coupons

Description

Returns an array of all coupons applied to a given transaction

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_coupons( $transaction ); ?>
  • mixed $transaction ID or object

Returns

string date

Exchange/it exchange get transaction coupons total

discount

Description

Return the total discount of all coupons applied to a given transaction

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_coupons_total_discount( $transaction, $format = true ); ?>
  • mixed $transaction ID or object
  • bool $format Format the price

Returns 

string date

Exchange/it exchange get transaction currency

Description

Return the currency used in the transaction

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_currency( $transaction ); ?>
  • mixed $transaction ID or object

Returns

string date

Exchange/it exchange get transaction customer

Description

Returns the customer object associated with a transaction

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_customer( $transaction ); ?>
  • mixed $transaction ID or object

Returns

object

Exchange/it exchange get transaction customer admin profile url

Description

Returns the transaction customer's profile URL

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_customer_admin_profile_url( $transaction, $options=array() ); ?>
  • mixed $transaction ID or object

Returns

string

Exchange/it exchange get transaction customer display name

Description

Returns the transaction customer's Display Name

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_customer_display_name( $transaction ); ?>
  • mixed $transaction ID or object

Returns

string

Exchange/it exchange get transaction customer email

Description

Returns the transaction customer's email

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_customer_email( $transaction ); ?>
  • mixed $transaction ID or object

Returns

string

Exchange/it exchange get transaction customer id

Description

Returns the transaction customer's ID

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_customer_id( $transaction ); ?>
  • mixed $transaction ID or object

Returns

string

Exchange/it exchange get transaction date

Description

Return the transaction date

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_date( $transaction, $format=false, $gmt=false ); ?>

 

  • mixed $transaction ID or object
  • string $format php date format
  • boolean $gmt return the gmt date?

Returns

string date

Exchange/it exchange get transaction description

Description

Returns the transaction description

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_description( $transaction ); ?>
  • mixed $transaction ID or object

Returns

string

Exchange/it exchange get transaction download hash index

Description

Get all download hashes attached to a specific transaction

History

Since 0.4.0Parameters

Parameters

<?php it_exchange_get_transaction_download_hash_index( $transaction ); ?>

 

  • mixed $transaction ID or object

Returns

array

Exchange/it exchange get transaction hash

Description

Returns the transaction hash from an ID

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_hash( $id ); ?>

 

  • integer $id transaction_id

Returns

mixed ID or false

Exchange/it exchange get transaction id from hash

Description

Returns a transaction ID based on the hash

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_id_from_hash( $hash ); ?>

 

  • string $hash

Returns

integer transaction id

Exchange/it exchange get transaction instructions

Description

Returns the instructions for a transaction instructions (provided by addon)

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_instructions( $transaction ); ?>

 

  • string $transaction_method the transaction method

Returns

string

Exchange/it exchange get transaction method

Description

Grabs the transaction method of a transaction

History

Since 0.3.3

Parameters

<?php it_exchange_get_transaction_method( $transaction=false ); ?>

 

Returns

string the transaction method

Exchange/it exchange get transaction method id

Description

Returns the name of a transaction method used for a specific transaction

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_method_id( $transaction ); ?>
  • mixed $transaction ID or object

Returns

string

Exchange/it exchange get transaction method make payment button

Description

Returns the make-payment action

Leans on tranasction_method to actually provide it.

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_method_make_payment_button ( $transaction_method, $options=array() ); ?>

 

  • string $tranasction_method slug registered with addon
  • array $options

Returns

mixed

Exchange/it exchange get transaction method name

Description

Returns the name of a transaction method used for a specific transaction

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_method_name( $transaction ); ?>

 

  • mixed $transaction ID or object

Returns

string

Exchange/it exchange get transaction method name from slug

Description

Returns the transaction method name from the add-on's slug

History

Since 0.3.7

Parameters

<?php it_exchange_get_transaction_method_name_from_slug( $slug ); ?>

 

Returns 

string

Exchange/it exchange get transaction method options

Description

Returns the options array for a registered transaction-method

History

Since 0.3.3

Parameters

<?php it_exchange_get_transaction_method_options( $transaction_method ); ?>

 

  • string $transaction_method slug for the transaction-method

Exchange/it exchange get transaction order number

Information

Get Transaction Order Number

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_order_number( $transaction, $prefix='#' ); ?>

 

  • mixed $transaction id or object

Returns

string

Exchange/it exchange get transaction product

Description

Returns a specific product from a transaction based on the product_cart_id

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_product( $transaction, $product_cart_id ); ?>
  • string $product_cart_id

Returns

object

Exchange/it exchange get transaction product feature

Description

Returns data from the transaction product

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_product_feature( $product, $feature ); ?>

 

  • object $transaction_product

Exchange/it exchange get transaction products

Description

Returns an array of product objects as they existed when added to the transaction

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_products( $transaction ); ?>

 

  • mixed $transaction id or object

Returns

array

Exchange/it exchange get transaction refunds

Description

Grab refunds for a transaction

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_refunds( $transaction ); ?>

 

  • mixed $transaction ID or object

Returns

array

Exchange/it exchange get transaction refunds total

Description

Returns the a sum of all the applied refund amounts for this transaction

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_refunds_total( $transaction, $format = true ); ?>

 

  • mixed $transaction ID or object
  • bool $format Format the price

Returns

numeric

Exchange/it exchange get transaction status

Description

Returns the transaction status for a specific transaction

History

Since 0.3.3

Parameters

<?php it_exchange_get_transaction_status( $transaction ); ?>
  • mixed $transaction the transaction id or object

Returns

string the transaction status

Exchange/it exchange get transaction status label

Description

Returns the label for a transaction status (provided by addon)

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_status_label( $transaction ); ?>
  • string $transaction_method the transaction method

Returns

string

Exchange/it exchange get transaction subtotal

Description

Return the transaction subtotal

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_subtotal( $transaction, $format_currency=true ); ?>

 

  • mixed $transaction ID or object
  • string $format php date format
  • boolean $gmt return the gmt date?

Returns

string date

Exchange/it exchange get transaction total

Description

Return the transaction total

History

Since 0.4.0

Parameters

<?php it_exchange_get_transaction_total( $transaction, $format_currency=true, $subtract_refunds=true ); ?>

 

  • mixed $transaction ID or object
  • boolean $format format the price?
  • boolean $subtract_refunds if refunds are present, subtract the difference?

Returns

string date

Exchange/it exchange get transactions

Description

Get IT_Exchange_Transactions

History

Since 0.3.3

Parameters

<?php it_exchange_get_transactions( $args=array() ); ?>

Returns

an array of IT_Exchange_Transaction objects

Exchange/it exchange get transactions for product

Description

Returns an array of all transactions for a product

Parameters

<?php it_exchange_get_transactions_for_product( $product, $type='objects', $only_cleared_for_delivery=true ); ?>
  • mixed $product the product ID or object
  • string $type do you want an array of ids or an array of objects returned
  • boolen $only_cleared_for_delivery defaults to true. Only return transactions cleared for delivery or return all

History

since 0.4.2

Returns

array

Exchange/it exchange get webhook

Description

Grab a specific registered webhook / IPN param

History

Since 0.4.0

Parameters

<?php it_exchange_get_webhook( $key ); ?>
  • string $key the key for the param we are looking for

Returns

string or false

Exchange/it exchange get webhooks

Description

Grab all registered webhook / IPN keys

History

Since 0.4.0

Parameters

<?php it_exchange_get_webhooks(); ?>

Returns

array

Exchange/it exchange has messages

Description

Checks if messages are in the to Exchange session

History

Since 0.4.0

Parameters

<?php it_exchange_has_messages( $type ); ?
  • string $type Type of message you want displayed

Exchange/it exchange has transaction refunds

Description

Checks if there are refunds for a transaction

History

Since 0.4.0

Parameters

<?php it_exchange_has_transaction_refunds( $transaction ); ?>
  • mixed $transaction ID or object

Returns

array

Exchange/it exchange increment download count

Description

Increments download counts

History

Since 0.4.0

Parameters

<?php it_exchange_increment_download_count( $download_info, $increment_admin_downloads=false ); ?>
  • array $download_info file hash data
  • boolean $increment_admin_downloads Default is false

Returns

void

Exchange/it exchange is addon enabled

Description

Checks if an add-on is enabled

History

Since 0.4.0

Parameters

<?php it_exchange_is_addon_enabled( $add_on_slug ); ?>
  • string $add_on_slug add_on slug to check

Returns

bool

Exchange/it exchange is addon installed

Description

Checks if an add-on is installed

History

Since 0.4.0

Parameters

<?php it_exchange_is_addon_installed( $add_on_slug ); ?>
  • string $add_on add_on slug to check

Returns

bool

Exchange/it exchange is multi item cart allowed

Description

Are multi item carts allowed?

Default is no. Addons must tell us yes as well as provide any pages needed for a cart / checkout / etc.

History

Since 0.4.0

Parameters

<?php it_exchange_is_multi_item_cart_allowed(); ?>

Returns

boolean

Exchange/it exchange is product available

Description

Is the product available based on start and end availability dates

History

Since 0.4.0

Parameters

<?php it_exchange_is_product_available( $product_id=false ); ?>
  • int $product_id Product ID

Returns

boolean

Exchange/it exchange is product visible

Description

Is the product visible based on start and end availability dates

History

Since 0.4.0

Parameters

<?php it_exchange_is_product_visible( $product_id=false ); ?>
  • int $product_id Product ID

Returns

boolean

Exchange/it exchange is view

Description

Is the the current view

History

Since 0.4.0

Parameters

<?php it_exchange_is_view( $view ); ?>
  • string $view the exchange view were checking for

Returns

boolean

Exchange/it exchange product has feature

Description

Check if a given product has a specific feature

History

Since 0.3.8

Parameters

<?php it_exchange_product_has_feature( $product_id, $feature_key, $options=array() ); ?>
  • integer $product_id the WordPress post ID for the product
  • string $feature_key the slug for the feature
  • array $options

Returns

boolean

Exchange/it exchange product supports feature

Description

Check if a given product supports a specific feature

History

Since 0.3.8

Parameters

<?php it_exchange_product_supports_feature( $product_id, $feature_key, $options=array() ); ?>
  • integer $product_id the WordPress post ID for the product
  • string $feature_key the slug for the feature
  • array $options

Returns

boolean

Exchange/it exchange product type supports feature

Description

Check if a given product-type supports a specific product feature

History

Since 0.3.8

Parameters

<?php it_exchange_product_type_supports_feature( $product_type, $feature_key ); ?>
  • string $product_type the product-type slug
  • string $feature_key the slug for the feature

Returns

boolean

Exchange/it exchange register addon

Description

Register an Add-on with iThemes Exchange

Core ‘category’ options for type of add-on

  • product-type Add-ons that create product types. eg: Digital, Membership
  • transaction-method Add-ons that create transactions. eg: Stripe, Tweet
  • admin General purpose admin functionality. eg: Reports, Export
  • other Everything else

Parameters

<pre><?php it_exchange_register_addon( $slug, $params ); ?></pre>

  • string $slug string for identifying the add-on in code
  • array $params key / value pairs.

Exchange/it exchange register addon category

Description

Register an Add-on category with iThemes Exchange

When registering an add-on category, you can set required/default support features that any add-on in this category will be required to have. If add-ons register in this category without a key they will be provided with a the value registered to the add-on category by default.

  • eg: $options['supports'] = array( 'feature' => 'default_value' );

Parameters

<?php it_exchange_register_addon_category( $slug, $name, $description, $options = array() ); ?>

  • string $slug var for identifying the add-on in code
  • string $name name of add-on used in UI
  • string $description description of the add-on
  • array $options key / value pairs.


Exchange/it exchange register coupon type

Description

Register a coupon type if it doesn't already exist

Add-ons should call this.

History

Since 0.4.0

Parameters

<?php it_exchange_register_coupon_type( $type ); ?>
  • string $type type of coupon

Returns

void

Exchange/it exchange register customer

Description

Registers a customer

History

Since 0.3.7

Parameters

<?php it_exchange_register_customer( $customer_data, $args=array() ); ?>
  • array $customer_data array of customer data to be processed by the customer management add-on when creating a customer
  • array $args optional array of arguments. not used by all add-ons

Returns

mixed

Exchange/it exchange register product feature

Description

Keeps track of all available product features

History

Since 0.3.8

Parameters

<?php it_exchange_register_product_feature( $slug, $description='', $default_product_types=array() ); ?>
  • slug

Returns

void

Exchange/it exchange register user

Description

Register's an exchange user

History

Since 0.4.0

Parameters

<?php it_exchange_register_user( $user_data=array() ); ?>
  • array $user_data optional. Overwrites POST data

Returns

mixed WP_Error or WP_User object

Exchange/it exchange register webhook

Description

Register a webhook / IPN key

History

Since 0.4.0

Parameters

<?php it_exchange_register_webhook( $key, $param ); ?>
  • string $key the addon slug or ID
  • string $param the REQUEST param we are listening for

Returns 

void

Exchange/it exchange remove addon support

Description

Remove's add-on support for a specific feature

History

Since 0.3.3

Parameters

<?php it_exchange_remove_addon_support( $add_on, $feature ); ?>
  • string $add_on the slug for the add-on being targeted
  • string $feature the feature slug that needs to be enabled

Returns

void

Exchange/it exchange remove cart data

Description

Removes cart data by key

History

Since 0.4.0

Parameters

<?php it_exchange_remove_cart_data( $key ); ?>

Exchange/it exchange remove coupon

Description

Remove a coupon

We're going to ask the add-ons to do this for us.

History

Since 0.4.0

Parameters

<?php it_exchange_remove_coupon( $type, $code, $options=array() ); ?>
  • string $type the type of coupon to check for
  • string $code the coupon code
  • array $options

Returns

boolean

Exchange/it exchange remove feature support for product type

Description

Removes support for a product-feature from a specific product-type

History

Since 0.3.8

Parameters

<?php it_exchange_remove_feature_support_for_product_type( $feature_key, $product_type ); ?>

  • string $feature_key the slug for the feature
  • string $product_type the product-type slug

Returns

void

Exchange/it exchange save option

Description

Save options

History

Since 0.3.6

Parameters 

<?php it_exchange_save_option( $key, $value ); ?>

 

  • string $key the options key
  • mixed $value the values to save to the options key

Returns

void

Exchange/it exchange serve product download

Description

Serves a file from its URL

Uses wp_remote_get to locate the file and force download.

History

Since 0.4.0

Parameters

<?php it_exchange_serve_product_download( $hash_data ); ?>
  • array $download_info download hash data

Returns

void

Exchange/it exchange set the product id

Description

Sets a global for the current product's id

Looks for paramater. If passed param is a vailid product id, it sets that.

If passed param is false or not a product id, it looks for global $post.

If global $post and passed param are not product ids, it is set to false

History

Since 0.3.8

Parameters

<?php it_exchange_set_the_product_id( $product_id=false ); ?>

 

  • integer $product_id

Returns

void

Exchange/it exchange supports coupon type

Description

Do we support a specific type of coupon

Ask the addon

History

Since 0.4.0

Parameters

<pre><?php it_exchange_supports_coupon_type( $type ); ?></pre>

* string $type the type of coupon

Returns

boolean

Exchange/it exchange update cart data

Description

Updates the data

History

Since 0.4.0

Parameters

<?php it_exchange_update_cart_data( $key, $data ); ?>

 

Returns

void

Exchange/it exchange update cart product

Description

Updates product into the cart session

History

Since 0.4.0

Parameters

<?php it_exchange_update_cart_product( $cart_product_id, $product ); ?>

 

Returns

array

Exchange/it exchange update cart product quantity

Description

Updates the quantity for a specific cart item

History

Since 0.4.0

Parameters

<?php it_exchange_update_cart_product_quantity( $cart_product_id, $quantity, $add_to_existing=true ); ?>

 

  • int $cart_product_id the product ID prepended to the itemized hash by a hyphen
  • int $quantity the incoming quantity
  • boolean $add_to_existing if set to false, it replaces the existing.

Returns

void

Exchange/it exchange update customer

Description

Update a customer's data

History

Since 0.3.7

Parameters

<?php it_exchange_update_customer( $customer_id, $customer_data, $args ); ?>

 

  • integer $customer_id id for the customer
  • mixed $customer_data data to be updated
  • array $args optional array of arguments. not used by all add-ons

Returns

mixed

Exchange/it exchange update download hash data

Description

Updates meta-data associated with a specific file hash

Hash has to already exist

History

Since 0.4.0

Parameters

<?php it_exchange_update_download_hash_data( $hash, $data ); ?>

 

  • string $hash
  • array $data

Returns

array updated data

Exchange/it exchange update product feature

Description

Update the given product's feature value

History

Since 0.3.8

Parameters

<?php it_exchange_update_product_feature( $product_id, $feature_key, $feature_value, $options=array() ); ?>

 

  • integer $product_id the WordPress post ID for the product
  • string $feature_key the slug for the feature
  • mixed $feature_value the value for the feature
  • array $options the options for the feature

Returns

boolean

Exchange/it exchange update session data

Description

Updates session data by key

History

Since 0.3.7

Parameters

<?php it_exchange_update_session_data( $key, $data ); ?>

 

  • mixed $key key for the data
  • mixed $data updated data

Returns

void

Exchange/it exchange update transaction

Description

Updates a transaction

History

Since 0.3.3

Parameters

<?php it_exchange_update_transaction( $args ); ?>

 

  • array transaction args. Must include ID of a valid transaction post

Returns

object transaction object

Exchange/it exchange update transaction download hash index

Description

This updates the index of hashes per product per transaction stored in the transaction

Parameters

<?php it_exchange_update_transaction_download_hash_index( $transaction, $product, $download_id, $hash ); ?>

 

  • mixed $transaction transaction ID or object
  • array $transaction_product this is the product array found in cart_details property in the transaction object
  • integer $download_id the id of the download attached to the product passed in param 2
  • string $hash the has we're adding to the index

Returns

boolean

Exchange/it exchange update transaction status

Description

Updates the transaction status of a transaction

History

Since 0.3.3

Parameters

<?php it_exchange_update_transaction_status( $transaction, $status ); ?>

 

  • mixed $transaction the transaction id or object
  • string $status the new transaction status

Exchange/IT Theme API Cart Item/get api context

Description

Returns the context. Also helps to confirm we are an iThemes Exchange theme API class

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Cart_Item::get_api_context(); ?>

 

Returns

string

Exchange/IT Theme API Cart Item/price

Description

Returns the price element / var based on format option

History

Since 0.4.0

<pre><?php IT_Theme_API_Cart_Item::price( $options=array() ); ?></pre>

Exchange/IT Theme API Cart Item/quantity

Description

Returns the quantity element / var based on format option

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Cart_Item::quantity( $options=array() ); ?>

 

Exchange/IT Theme API Cart Item/remove

Description

Returns the remove from cart element / var based on format option

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Cart_Item::remove( $options=array() ); ?>

 

Exchange/IT Theme API Cart Item/sub total

Description

Returns the subtotal for the cart item (price * quantity)

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Cart_Item::sub_total( $options=array() ); ?>

 

Returns

string

Exchange/IT Theme API Cart Item/supports purchase quantity

Description

Returns boolean. Does this cart item support a purcahse quantity

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Cart_Item::supports_purchase_quantity( $options=array() ); ?>

 

Exchange/IT Theme API Cart Item/title

Description

Returns the title element / var based on format option

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Cart_Item::title( $options=array() ); ?>

 

Exchange/IT Theme API Cart/cart items

Description

This loops through the cart session products and updates the cart-item global.

It return false when it reaches the last item

If the has flag has been passed, it just returns a boolean

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Cart::cart_items( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Cart/checkout cart

Parameters

<?php IT_Theme_API_Cart::checkout_cart( $options=array() ); ?>

 

Exchange/IT Theme API Cart/empty cart

Parameters

<?php IT_Theme_API_Cart::empty_cart( $options=array() ); ?>

Exchange/IT Theme API Cart/focus

Description

Return the current focus if indicated

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Cart::focus( $options=array() ); ?>

 

Returns

string

Exchange/IT Theme API Cart/form close

Description

Prints the closing form field

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Cart::form_close( $options=array() ); ?>

 

Exchange/IT Theme API Cart/form open

Description

Prints the opening form field tag for the cart

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Cart::form_open( $options=array() ); ?>

 

Exchange/IT Theme API Cart/get api context

Description

Returns the context. Also helps to confirm we are an iThemes Exchange theme API class

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Cart::get_api_context(); ?>

 

Returns

string

Exchange/IT Theme API Cart/item count

Description

Returns the number of items in the cart

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Cart::item_count(); ?>

 

Returns

integer

Exchange/IT Theme API Cart/multiple items

Description

Does the cart support multiple items?

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Cart::multiple_items( $options=array() ); ?>

 

  • array $options

Returns

boolean

Exchange/IT Theme API Cart/nonce field

Description

Returns the nonce form field

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Cart::nonce_field( $options=array() ); ?>

 

Exchange/IT Theme API Cart/sub total

Parameters

<?php IT_Theme_API_Cart::sub_total( $options=array() ); ?>

Exchange/IT Theme API Cart/total

Parameters

<?php IT_Theme_API_Cart::total( $options=array() ); ?>

Exchange/IT Theme API Cart/update cart

Description

Returns the update cart button / varname

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Cart::update_cart( $options=array() ); ?>

Exchange/IT Theme API Checkout/cancel

Description

Returns data/html for cancel action

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Checkout::cancel( $options=array() ); ?>

 

  • array $options

Returns

mixed

Exchange/IT Theme API Checkout/get api context

Description

Returns the context. Also helps to confirm we are an iThemes Exchange theme API class

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Checkout::get_api_context(); ?>

 

Returns

string

Exchange/IT Theme API Checkout/transaction methods

Description 

Sets up transaction method loop

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Checkout::transaction_methods( $options=array() ); ?>

 

  • array $options

Returns

mixed

Exchange/IT Theme API Coupons/accepting

Description

Are we accepting new coupons?

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Coupons::accepting( $options=array() ); ?>

 

  • array $options

Returns

boolean

Exchange/IT Theme API Coupons/applied

Description

Do we have any coupons currently applied

We rely on the add-on to give us the answer. Should check for type asked.

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Coupons::applied( $options=array() ); ?>

 

  • array $options

Returns

boolean

Exchange/IT Theme API Coupons/apply

Description

Returns the field for applying a coupon

Can also return the field var

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Coupons::apply( $options=array() ); ?>

 

  • array $otpoins

Returns

string

Exchange/IT Theme API Coupons/code

Parameters

<?php IT_Theme_API_Coupons::code( $options=array() ); ?>

Exchange/IT Theme API Coupons/discount

Parameters

<?php IT_Theme_API_Coupons::discount( $options=array() ); ?>

Exchange/IT Theme API Coupons/discount label

Description

Returns the coupon discount label

ie: $10.00 or 10%

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Coupons::discount_label( $options=array() ); ?>

 

  • array $options optional

Returns

string

Exchange/IT Theme API Coupons/discount method

Description

The coupon Discount Method if the coupon addon provides one

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Coupons::discount_method( $options=array() ); ?>

 

Returns

string

Exchange/IT Theme API Coupons/expiration

Description

The coupon expiration

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Coupons::expiration( $options=array() ); ?>

 

Returns

string

Exchange/IT Theme API Coupons/found

Description

Returns boolean value if we have a coupon or not

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Coupons::found( $options=array() ); ?>

 

Returns

boolean

Exchange/IT Theme API Coupons/get api context

Description

Returns the context. Also helps to confirm we are an iThemes Exchange theme API class

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Coupons::get_api_context(); ?>

Returns

string

Exchange/IT Theme API Coupons/is supported

Description

Are we supporting coupons?

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Coupons::is_supported( $options=array() ); ?>
  • array $options

Returns

boolean

Exchange/IT Theme API Coupons/limit

Description

The coupon Limit

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Coupons::limit( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Coupons/remove

Description

Returns the remove coupon var, link, checkbox. Default is link

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Coupons::remove( $options ); ?>

Exchange/IT Theme API Coupons/title

Description

The coupon title

History 

Since 0.4.0

Parameters

<?php IT_Theme_API_Coupons::title( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Coupons/total discount

Parameters

<?php IT_Theme_API_Coupons::total_discount( $options=array() ); ?>

Exchange/IT Theme API Customer/account menu

Description

Outputs the customer's account menu data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Customer::account_menu( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Customer/avatar

Description

Outputs the customer's avatar data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Customer::avatar( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Customer/email

Description

Outputs the customer's email data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Customer::email( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Customer/first name

Description

Outputs the customer's first name data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Customer::first_name( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Customer/form close

Description

Outputs the profile page end of form

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Customer::form_close( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Customer/form open

Description

Outputs the profile page start of form

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Customer::form_open( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Customer/get api context

Description

Returns the context. Also helps to confirm we are an iThemes Exchange theme API class

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Customer::get_api_context(); ?>

Returns

string

Exchange/IT Theme API Customer/last name

Description

Outputs the customer's last name data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Customer::last_name( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Customer/menu

Description

Outputs the customer menu

Default: profile / purchases / downloads

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Customer::menu( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Customer/password1

Description

Outputs the customer's password(1) input data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Customer::password1( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Customer/password2

Description

Outputs the customer's password(2) input data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Customer::password2( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Customer/save

Description

Outputs the profile page save button

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Customer::save( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Customer/username

Description

Outputs the customer's username data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Customer::username( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Customer/website

Description

Outputs the customer's website data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Customer::website( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Download/expiration

Description

The download expiration

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Download::expiration( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Download/found

Description

Returns boolean value if we have a download or not

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Download::found( $options=array() ); ?>

Returns

boolean

Exchange/IT Theme API Download/get api context

Description

Returns the context. Also helps to confirm we are an iThemes Exchange theme API class

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Download::get_api_context(); ?>

Returns

string

Exchange/IT Theme API Download/limit

Description

The download Limit

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Download::limit( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Download/title

Description

The download title

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Download::title( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Login/form close

Description

Outputs the profile page end of form

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Login::form_close( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Login/form open

Description

Outputs the login page start of form

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Login::form_open( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Login/get api context

Description

Returns the context. Also helps to confirm we are an iThemes Exchange theme API class

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Login::get_api_context(); ?>

Returns

string

Exchange/IT Theme API Login/login button

Description

Outputs the login page login button

Parameters 

<?php IT_Theme_API_Login::login_button( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Login/password

Description

Outputs the login's password input data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Login::password( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Login/recover

Description

Outputs the login page login button

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Login::recover( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Login/register

Description

Outputs the registration link by default.

Can also output the registration URL

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Login::register( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Login/remember me

Description

Outputs the login's remember me input data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Login::remember_me( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Login/username

Description

Outputs the login's username data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Login::username( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Messages/error

Description

Returns current error

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Messages::error( $options=array() ); ?>

Returns

mixed boolean or string

Exchange/IT Theme API Messages/errors

Description

Loops through errors

If has option is true, returns boolean

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Messages::errors( $options=array() ); ?>

Returns

boolean

Exchange/IT Theme API Messages/get api context

Description

Returns the context. Also helps to confirm we are an iThemes Exchange theme API class

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Messages::get_api_context(); ?>

Returns

string

Exchange/IT Theme API Messages/notice

Description

Returns current notice

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Messages::notice( $options=array() ); ?>

Returns

mixed boolean or string

Exchange/IT Theme API Messages/notices

Description

Loops through Notices

If has option is true, returns boolean

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Messages::notices( $options=array() ); ?>

Returns

boolean

Exchange/IT Theme API Product/add to cart

Parameters

<?php IT_Theme_API_Product::add_to_cart( $options=array() ); ?>

Exchange/IT Theme API Product/add to cart var

Description

Returns a add_to_cart var

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::add_to_cart_var( $options ); ?>
  • array $options

Returns

string

Exchange/IT Theme API Product/author

Description

The product author

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::author( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Product/availability

Description

The product's dates purchase availability

Use type of 'start', 'end', 'both', either in options

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::availability( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Product/base price

Description

The product base price

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::base_price( $options=array() ); ?>

Returns

mixed

Exchange/IT Theme API Product/buy now

Parameters

<?php IT_Theme_API_Product::buy_now( $options=array() ); ?>

Exchange/IT Theme API Product/buy now var

Description

Returns a buy_now var

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::buy_now_var( $options ); ?>
  • array $options

Returns

string

Exchange/IT Theme API Product/description

Description

The product's large description

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::description( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Product/downloads

Description

Returns downloads for product.

If has option is true, returns boolean

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::downloads( $options=array() ); ?>

Returns

boolean

Exchange/IT Theme API Product/excerpt

Description

The product's WP excerpt

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::excerpt( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Product/extended description

Description

The extended description

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::extended_description( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Product/featured image

Description

The product's featured image

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::featured_image( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Product/found

Description

Returns boolean value if we have a product or not

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::found( $options=array() ); ?>

Returns

boolean

Exchange/IT Theme API Product/get api context

Description

Returns the context. Also helps to confirm we are an iThemes Exchange theme API class

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::get_api_context(); ?>

Returns

string

Exchange/IT Theme API Product/inventory

Description

The product's current inventory

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::inventory( $options=array() ); ?>

Returns

integer

Exchange/IT Theme API Product/is available

Description

Uses start and end availability dates to now to determine if the product is currently available

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::is_available( $options=array() ); ?>

Returns

boolean

Exchange/IT Theme API Product/is visible

Description

Uses start and end availability dates to now to determine if the product is currently available

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::is_visible( $options=array() ); ?>

Returns

boolean

Exchange/IT Theme API Product/permalink

Description

The permalink

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::permalink( $options=array() ); ?>

Returns

mixed

Exchange/IT Theme API Product/product gallery

Description

The product's product image gallery

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::product_gallery( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Product/product images

Description

The product's product images

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::product_images( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Product/purchase options

Description

Returns the buy now or add_to_cart form. Or both.

Options:

  • buy-now-before: Gets added before the buy-now form
  • buy-now-after: Gets added after the buy-now form
  • buy-now-class: A CSS class applied to the buy-now button
  • buy-now-label: The HTML value of the buy now button.
  • buy-now-button-type: The button-type: submit or button. Default is submit
  • buy-now-button-name: The default is false. No name attribute is provided when false
  • add-to-cart-before: Gets added before the buy-now form
  • add-to-cart-after: Gets added after the buy-now form
  • add-to-cart-class: A CSS class applied to the buy-now button
  • add-to-cart-label: The HTML value of the buy now button.
  • add-to-cart-button-type: The button-type: submit or button. Default is submit
  • add-to-cart-button-name: The default is false. No name attribute is provided when false

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::purchase_options( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Product/purchase quantity

Description

The product purchase quantity (max purchase option by customer)

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::purchase_quantity( $options=array() ); ?>

Returns

integer

Exchange/IT Theme API Product/title

Description

The product title

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::title( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Product/visibility

Description

The product's dates purchase availability

Use type of 'start', 'end', 'both', either in options

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Product::visibility( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Registration/disabled message

Description

Outputs the profile page registration disabled message

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Registration::disabled_message( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Registration/email

Description

Outputs the customer's email data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Registration::email( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Registration/firstname

Description

Outputs the customer's first name data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Registration::firstname( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Registration/form close

Description

Outputs the profile page end of form

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Registration::form_close( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Registration/form open

Description

Outputs the profile page start of form

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Registration::form_open( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Registration/get api context

Description

Returns the context. Also helps to confirm we are an iThemes Exchange theme API class

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Registration::get_api_context(); ?>

Returns

string


Exchange/IT Theme API Registration/is enabled

Description

Checks if registration is enabled or disabled

(enabled by default unless using WordPress setting)

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Registration::is_enabled( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Registration/lastname

Description

Outputs the customer's last name data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Registration::lastname( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Registration/password1

Description

Outputs the customer's password(1) input data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Registration::password1( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Registration/password2

Description

Outputs the customer's password(2) input data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Registration::password2( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Registration/save

Description

Outputs the profile page save button

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Registration::save( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Registration/username

Description

Outputs the login's username data

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Registration::username( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Store/get api context

Description

Returns the context. Also helps to confirm we are an iThemes Exchange theme API class

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Store::get_api_context(); ?>

Returns

string

Exchange/IT Theme API Store/products

Description

This loops through the products GLOBAL and updates the product global.

It return false when it reaches the last product

If the has flag has been passed, it just returns a boolean

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Store::products( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Transaction Method/get api context

Description

Returns the context. Also helps to confirm we are an iThemes Exchange theme API class

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Transaction_Method::get_api_context(); ?>

Returns

string

Exchange/IT Theme API Transaction Method/make payment

Description

Returns the payment action data/html

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Transaction_Method::make_payment( $options=array() ); ?>
  • array $options

Returns

mixed

Exchange/IT Theme API Transaction/date

Description

Returns the transaction date

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Transaction::date( $options=array() ); ?>
  • array $options output options

Returns

string

Exchange/IT Theme API Transaction/get api context

Description

Returns the context. Also helps to confirm we are an iThemes Exchange theme API class

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Transaction::get_api_context(); ?>

Returns

string

Exchange/IT Theme API Transaction/instructions

Description

Returns the transaction instructions

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Transaction::instructions( $options=array() ); ?>

Exchange/IT Theme API Transaction/product attribute

Parameters

<?php IT_Theme_API_Transaction::product_attribute( $options=array() ); ?>

Exchange/IT Theme API Transaction/product download

Parameters

<?php IT_Theme_API_Transaction::product_download( $options=array() ); ?>

Exchange/IT Theme API Transaction/product download hash

Parameters

<?php IT_Theme_API_Transaction::product_download_hash( $options=array() ); ?>

Exchange/IT Theme API Transaction/product download hashes

Parameters

<?php IT_Theme_API_Transaction::product_download_hashes( $options=array() ); ?>

Exchange/IT Theme API Transaction/product downloads

Parameters

<?php IT_Theme_API_Transaction::product_downloads( $options=array() ); ?>

Exchange/IT Theme API Transaction/products

Description

This loops through the transaction_products GLOBAL and updates the transaction_product global.

It return false when it reaches the last product

If the has flag has been passed, it just returns a boolean

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Transaction::products( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Transaction/status

Description

Returns the transaction status

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Transaction::status( $options=array() ); ?>

Exchange/IT Theme API Transaction/total

Description

Returns the transaction total

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Transaction::total( $options=array() ); ?>
  • array $options output options

Returns

string

Exchange/IT Theme API Transactions/found

Description

This loops through the transactions GLOBAL and updates the transaction global.

It return false when it reaches the last transaction

History

Since 0.4.0

Parameters

<?php IT_Theme_API_Transactions::found( $options=array() ); ?>

Returns

string

Exchange/IT Theme API Transactions/get api context

Description

Returns the context. Also helps to confirm we are an iThemes Exchange theme API class

History 

Since 0.4.0

Parameters

<?php IT_Theme_API_Transactions::get_api_context(); ?> 

Returns

string

Exchange/ithemes exchange wp get nav menu items filter

Description

Get name for ghost page

History

Since 0.4.0

Parameters

<?php ithemes_exchange_wp_get_nav_menu_items_filter( $items, $menu, $args ); ?>
  • string $page page setting

Returns

string url

Exchange/wp nav menu disabled check

Description

From WordPress 3.6.0 for back-compat

Check whether to disable the Menu Locations meta box submit button

History

Since 0.4.0

Parameters

<?php wp_nav_menu_disabled_check( $nav_menu_selected_id );
  • int|string $nav_menu_selected_id (id, name or slug) of the currently-selected menu

Returns

string Disabled attribute if at least one menu exists, false if not

Uses

  • global $one_theme_location_no_menus to determine if no menus exist
  • disabled() to output the disabled attribute in $other_attributes param in submit_button()
Have more questions? Submit a request
Powered by Zendesk