@@ 14-28 (lines=15) @@ | ||
11 | */ |
|
12 | private $plugin_dirname = WPS_OPINION_DIR; |
|
13 | ||
14 | function __construct() { |
|
15 | $this->template_dir = WPS_OPINION_PATH . WPS_OPINION_DIR . "/templates/"; |
|
16 | add_action( 'admin_init', array( $this, 'declare_options' ) ); |
|
17 | add_shortcode( 'wps_opinion', array( $this, 'display_opinion_customer_interface') ); |
|
18 | add_shortcode( 'wps_star_rate_product', array( $this, 'display_star_rate_in_product') ); |
|
19 | add_shortcode( 'wps_opinion_product', array( $this, 'display_opinion_in_product') ); |
|
20 | add_action( 'wp_enqueue_scripts', array( $this, 'add_scripts' ) ); |
|
21 | ||
22 | /** Ajax actions **/ |
|
23 | add_action( 'wp_ajax_wps-opinion-save-form', array( $this, 'wps_opinion_save_form') ); |
|
24 | add_action( 'wp_ajax_nopriv_wps-opinion-save-form', array( $this, 'wps_opinion_save_form') ); |
|
25 | add_action( 'wp_ajax_wps-update-opinion-star-rate', array( $this, 'wps_update_opinion_star_rate') ); |
|
26 | add_action( 'wp_ajax_wps-refresh-add-opinion-list', array( $this, 'wps_refresh_add_opinion_list') ); |
|
27 | add_action( 'wp_ajax_wps_fill_opinion_modal', array( $this, 'wps_fill_opinion_modal') ); |
|
28 | } |
|
29 | ||
30 | /** |
|
31 | * Add JS Files |
@@ 33-53 (lines=21) @@ | ||
30 | private $plugin_dirname = WPS_CLASSIC_CHECKOUT_DIR; |
|
31 | ||
32 | ||
33 | function __construct() { |
|
34 | /** Template Load **/ |
|
35 | $this->template_dir = WPS_CLASSIC_CHECKOUT_PATH . WPS_CLASSIC_CHECKOUT_DIR . "/templates/"; |
|
36 | ||
37 | /** Classic Checkout Shortcode **/ |
|
38 | add_shortcode( 'wps_checkout', array( &$this, 'show_classic_checkout') ); |
|
39 | add_shortcode( 'wpshop_checkout', array( &$this, 'show_classic_checkout') ); |
|
40 | /** Checkout Step indicator **/ |
|
41 | add_shortcode('wps_checkout_step_indicator', array(&$this, 'get_checkout_step_indicator') ); |
|
42 | ||
43 | // Add scripts |
|
44 | add_action( 'wp_enqueue_scripts', array( $this, 'add_scripts') ); |
|
45 | ||
46 | /** Ajax Actions **/ |
|
47 | add_action( 'wp_ajax_wps-checkout_valid_step_three', array( &$this, 'wps_checkout_valid_step_three') ); |
|
48 | add_action( 'wp_ajax_wps-checkout_valid_step_four', array( &$this, 'wps_checkout_valid_step_four') ); |
|
49 | add_action( 'wp_ajax_wps-checkout_valid_step_five', array( &$this, 'wps_checkout_valid_step_five') ); |
|
50 | ||
51 | add_action( 'admin_post_wps_direct_payment_link', array( 'wpshop_checkout', 'wps_direct_payment_link' ) ); |
|
52 | add_action( 'admin_post_nopriv_wps_direct_payment_link', array( 'wpshop_checkout', 'wps_direct_payment_link_nopriv' ) ); |
|
53 | } |
|
54 | ||
55 | /** |
|
56 | * Add scripts |