Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP_STRIPE_KEY: Prevent assumed WP_STRIPE_KEY #31

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/stripe-widget-recent.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class wp_stripe_recent_widget extends WP_Widget {
/**
* Widget setup.
*/
function wp_stripe_recent_widget() {
function __construct() {

/* Widget settings. */
$widget_ops = array( 'classname' => 'wp-stripe-recent', 'description' => __( 'Display a list of the latest public donations.', 'wp-stripe' ) );
Expand All @@ -14,7 +14,7 @@ function wp_stripe_recent_widget() {
$control_ops = array( 'width' => 200, 'height' => 350, 'id_base' => 'wp-stripe-recent' );

/* Create the widget. */
$this->WP_Widget( 'wp-stripe-recent', __( 'WP Stripe - Recent', 'wp-stripe' ), $widget_ops, $control_ops );
parent::__construct( 'wp-stripe-recent', __( 'WP Stripe - Recent', 'wp-stripe' ), $widget_ops, $control_ops );

}

Expand Down
2 changes: 1 addition & 1 deletion wp-stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function load_wp_stripe_js() {
wp_enqueue_script( 'wp-stripe-js', WP_STRIPE_URL . 'js/wp-stripe.js', array( 'jquery' ), WP_STRIPE_VERSION );

// Pass some variables to JS
wp_localize_script( 'wp-stripe-js', 'wpstripekey', WP_STRIPE_KEY );
wp_localize_script( 'wp-stripe-js', 'wpstripekey', (defined('WP_STRIPE_KEY')? WP_STRIPE_KEY : null));
wp_localize_script( 'wp-stripe-js', 'ajaxurl', admin_url( 'admin-ajax.php' ) );

}
Expand Down