Skip to content

Commit

Permalink
Merge pull request #1088 from laterpay/fix/vip-suggestions-04
Browse files Browse the repository at this point in the history
Remove esc_js as not necessary and Option helper for now
  • Loading branch information
thrijith authored Jan 11, 2019
2 parents f36ac5d + 086ceda commit 395eef9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 30 deletions.
2 changes: 1 addition & 1 deletion laterpay/application/Controller/Admin/Appearance.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function load_assets() {
),
'l10n_print_after' => 'lpVars.overlaySettings = JSON.parse(lpVars.overlaySettings)',
'gaData' => array(
'sandbox_merchant_id' => ( ! empty( $merchant_key ) ) ? esc_js( $merchant_key ) : '',
'sandbox_merchant_id' => ( ! empty( $merchant_key ) ) ? $merchant_key : '',
),
)
);
Expand Down
2 changes: 1 addition & 1 deletion laterpay/application/Controller/Admin/Post/Metabox.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function load_scripts() {
'l10n_print_after' => 'jQuery.extend(lpVars, laterpay_post_edit)',
'postPriceBehaviour' => LaterPay_Helper_Pricing::get_post_price_behaviour(),
'gaData' => array(
'sandbox_merchant_id' => ( ! empty( $merchant_key ) ) ? esc_js( $merchant_key ) : '',
'sandbox_merchant_id' => ( ! empty( $merchant_key ) ) ? $merchant_key : '',
),
)
);
Expand Down
4 changes: 2 additions & 2 deletions laterpay/application/Controller/Admin/Pricing.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function load_assets() {
lpVars.sub_vouchers_list = JSON.parse(lpVars.sub_vouchers_list);
lpVars.vouchers_statistic = JSON.parse(lpVars.vouchers_statistic);',
'gaData' => array(
'sandbox_merchant_id' => ( ! empty( $merchant_key ) ) ? esc_js( $merchant_key ) : '',
'sandbox_merchant_id' => ( ! empty( $merchant_key ) ) ? $merchant_key : '',
),
)
);
Expand Down Expand Up @@ -1016,7 +1016,7 @@ protected function update_enabled_post_types( LaterPay_Core_Event $event ) {
}

// Update option for enabled post types.
$is_updated = LaterPay_Helper_Option::update_laterpay_option( 'laterpay_enabled_post_types', $enabled_post_types );
$is_updated = update_option( 'laterpay_enabled_post_types', $enabled_post_types );

if ( ! $is_updated ) {

Expand Down
4 changes: 2 additions & 2 deletions laterpay/application/Controller/Admin/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ public function load_assets()
'invalidCode' => esc_html__( 'Please enter valid UA-ID code!', 'laterpay' ),
),
'gaData' => array(
'custom_roles' => array_map( 'esc_js', $custom_role_names ),
'sandbox_merchant_id' => ( ! empty( $merchant_key ) ) ? esc_js( $merchant_key ) : '',
'custom_roles' => $custom_role_names,
'sandbox_merchant_id' => ( ! empty( $merchant_key ) ) ? $merchant_key : '',
),
)
);
Expand Down
24 changes: 0 additions & 24 deletions laterpay/application/Helper/Option.php

This file was deleted.

0 comments on commit 395eef9

Please sign in to comment.