pmpro_checkout_shortcode

The Paid Memberships Pro pmpro checkout shortcode function.

Description

pmpro_checkout_shortcode( $atts, (constant) $content = null, (string) $code = '' ); 

Parameters (3)

0. $atts
The atts.
1. $content — Optional. (constant) => null
The content.
2. $code — Optional. (string) => ''
The code.

Usage

  1. if ( !function_exists( 'pmpro_checkout_shortcode' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/shortcodes/checkout.php'; 
  3.  
  4. // The atts. 
  5. $atts = null; 
  6.  
  7. // The content. 
  8. $content = null; 
  9.  
  10. // The code. 
  11. $code = ''; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = pmpro_checkout_shortcode($atts, $content, $code); 
  15.  

Defined (1)

The function is defined in the following location(s).

/shortcodes/checkout.php  
  1. function pmpro_checkout_shortcode($atts, $content=null, $code="") 
  2. {  
  3. ob_start(); 
  4. if(file_exists(get_stylesheet_directory() . "/paid-memberships-pro/pages/checkout.php")) 
  5. include(get_stylesheet_directory() . "/paid-memberships-pro/pages/checkout.php"); 
  6. else 
  7. include(plugin_dir_path(dirname(__FILE__)) . "/pages/checkout.php"); 
  8. $temp_content = ob_get_contents(); 
  9. ob_end_clean(); 
  10. return apply_filters("pmpro_pages_shortcode_checkout", $temp_content);