Skip to content

Commit

Permalink
removed commented if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Aashish committed May 23, 2024
1 parent 58845c3 commit 6d76284
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions includes/blocks/gateways/omise-block-installment.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,18 @@ public function is_active() {
* @return array
*/
public function get_payment_method_script_handles() {
//if (is_checkout() && !is_wc_endpoint_url( 'order-received' )) {
if (!wp_script_is("wc-{$this->name}-payments-blocks", 'enqueued')) {
$script_asset = require __DIR__ . "/../assets/js/build/{$this->name}.asset.php";
wp_register_script(
"wc-{$this->name}-payments-blocks",
plugin_dir_url(__DIR__) . "assets/js/build/{$this->name}.js",
$script_asset['dependencies'],
$script_asset['version'],
true
);
if (!wp_script_is("wc-{$this->name}-payments-blocks", 'enqueued')) {
$script_asset = require __DIR__ . "/../assets/js/build/{$this->name}.asset.php";
wp_register_script(
"wc-{$this->name}-payments-blocks",
plugin_dir_url(__DIR__) . "assets/js/build/{$this->name}.js",
$script_asset['dependencies'],
$script_asset['version'],
true
);

wp_enqueue_script("wc-{$this->name}-payments-blocks");
}
//}
wp_enqueue_script("wc-{$this->name}-payments-blocks");
}

return ["wc-{$this->name}-payments-blocks"];
}
Expand Down

0 comments on commit 6d76284

Please sign in to comment.