PluginProbe
Welcart e-Commerce / 2.12.4
Welcart e-Commerce v2.12.4
2.12.4 2.12.3 2.11.35 2.12.2 2.12.1 2.11.34 2.11.33 2.11.32 2.11.31 2.11.30 1.3.16 1.3.17 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 All 292 releases
← All changes | functions/shortcode.php +34 -17 1.4.12.12.4 View file →
@@ -1,17 +1,34 @@
1 -<?php
2 -function sc_direct_intoCart($atts) {
3 - global $usces;
4 - extract(shortcode_atts(array(
5 - 'item' => '',
6 - 'sku' => '',
7 - 'value' => NULL,
8 - 'options' => NULL,
9 - ), $atts));
10 -
11 - if( WCUtils::is_blank($item) || WCUtils::is_blank($sku) ) return '';
12 -
13 - $post_id = $usces->get_ID_byItemName($item);
14 -
15 - return usces_direct_intoCart($post_id, $sku, true, $value, $options, 'return');
16 -}
17 -?>
1 +<?php
2 +/**
3 + * Shortcode.
4 + *
5 + * @package Welcart
6 + */
7 +
8 +/**
9 + * Direct into cart.
10 + *
11 + * @param array $atts Attributes.
12 + * @return usces_direct_intoCart
13 + */
14 +function sc_direct_intoCart( $atts ) {
15 + global $usces;
16 + extract(
17 + shortcode_atts(
18 + array(
19 + 'item' => '',
20 + 'sku' => '',
21 + 'value' => null,
22 + 'options' => null,
23 + ),
24 + $atts
25 + )
26 + );
27 +
28 + if ( WCUtils::is_blank( $item ) || WCUtils::is_blank( $sku ) ) {
29 + return '';
30 + }
31 + $post_id = $usces->get_ID_byItemName( $item );
32 +
33 + return usces_direct_intoCart( $post_id, $sku, true, $value, $options, 'return' );
34 +}