403Webshell
Server IP : 162.0.217.223  /  Your IP : 216.73.216.150
Web Server : LiteSpeed
System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : mypckeys ( 1539)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/mypckeys/www/wp-content/plugins/woo-stripe-payment/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mypckeys/www/wp-content/plugins/woo-stripe-payment/includes/class-wc-stripe-shortcodes.php
<?php
defined( 'ABSPATH' ) || exit();

/**
 * Class WC_Stripe_Shortcodes
 * @since 3.2.15
 */
class WC_Stripe_Shortcodes {

	public static function init() {
		$shortcodes = array(
			'wc_stripe_payment_buttons' => array( 'WC_Stripe_Shortcodes', 'payment_buttons' ),
		);

		foreach ( $shortcodes as $key => $function ) {
			add_shortcode( $key, apply_filters( 'wc_stripe_shortcode_function', $function ) );
		}
	}

	/**
	 * @param $atts
	 *
	 * @return string
	 */
	public static function payment_buttons( $atts ) {
		$method  = '';
		$wrapper = array(
			'class' => 'wc-stripe-shortcode'
		);
		if ( is_product() ) {
			$method           = 'output_product_buttons';
			$wrapper['class'] = $wrapper['class'] . ' wc-stripe-shortcode-product-buttons';
		} else if ( ! is_null( WC()->cart ) && ( is_cart() || ( isset( $atts['page'] ) && 'cart' === $atts['page'] ) ) ) {
			$method           = 'output_cart_buttons';
			$wrapper['class'] = $wrapper['class'] . ' wc-stripe-shortcode-cart-buttons';
		}
		if ( ! $method ) {
			return '';
		}
		include_once stripe_wc()->plugin_path() . 'includes/shortcodes/class-wc-stripe-shortcode-payment-buttons.php';

		return WC_Shortcodes::shortcode_wrapper( array( 'WC_Stripe_Shortcode_Payment_Buttons', $method ), $atts, $wrapper );
	}
}

WC_Stripe_Shortcodes::init();

Youez - 2016 - github.com/yon3zu
LinuXploit