Skip to content

Commit

Permalink
fix: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcuzz committed Jan 17, 2024
1 parent b58563c commit 27129dc
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
3 changes: 1 addition & 2 deletions assets/js/vipps-recurring-payment-method-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ function registerVippsRecurringGateway() {
const {applyFilters} = window.wp.hooks;

const settings = getSetting('vipps_recurring_data', {});
const defaultLabel = VippsRecurringLocale['Vipps'];
const ariaLabel = decodeEntities(settings.title) || defaultLabel;
const ariaLabel = decodeEntities(settings.title);
const logo = settings.logo;

const Content = () => {
Expand Down
Empty file removed assets/js/vipps-recurring.js
Empty file.
2 changes: 1 addition & 1 deletion includes/wc-vipps-recurring-blocks-support.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function get_payment_method_script_handles() {
$version = filemtime( WC_VIPPS_RECURRING_PLUGIN_PATH . "/assets/js/vipps-recurring-payment-method-block.js" );
$path = WC_VIPPS_RECURRING_PLUGIN_URL . '/assets/js/vipps-recurring-payment-method-block.js';
$handle = 'wc-payment-method-vipps_recurring';
$dependencies = [ 'wp-hooks', 'wp-i18n', 'woo-vipps-recurring' ];
$dependencies = [ 'wp-hooks', 'wp-i18n' ];

wp_register_script( $handle, $path, $dependencies, $version, true );

Expand Down
9 changes: 0 additions & 9 deletions woo-vipps-recurring.php
Original file line number Diff line number Diff line change
Expand Up @@ -811,15 +811,6 @@ public function add_gateways( $methods ): array {
public function wp_enqueue_scripts() {
wp_enqueue_style( 'woo-vipps-recurring', plugins_url( 'assets/css/vipps-recurring.css', __FILE__ ), [],
filemtime( __DIR__ . '/assets/css/vipps-recurring.css' ) );

wp_register_script( 'woo-vipps-recurring', plugins_url( 'assets/js/vipps-recurring.js', __FILE__ ), [], filemtime( dirname( __FILE__ ) . "/assets/js/vipps-recurring.js" ), true );

$strings = [
'Vipps' => 'Vipps',
'Continue with %s' => sprintf(__('Continue with %s', 'woo-vipps-recurring'), 'Vipps')
];
wp_localize_script('woo-vipps-recurring', 'VippsRecurringLocale', $strings);
wp_enqueue_script( 'woo-vipps-recurring' );
}

/**
Expand Down

0 comments on commit 27129dc

Please sign in to comment.