Skip to content

Commit

Permalink
change require_once to require in block.
Browse files Browse the repository at this point in the history
  • Loading branch information
aashishgurung committed Oct 1, 2024
1 parent 25b9789 commit 8850a92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion includes/blocks/gateways/abstract-omise-block-apm.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function is_active() {
*/
public function get_payment_method_script_handles() {
if ( ! wp_script_is( 'wc-omise-one-click-apms-payments-blocks', 'enqueued' ) ) {
$script_asset = require_once __DIR__ . '/../assets/js/build/omise-one-click-apms.asset.php';
$script_asset = require __DIR__ . '/../assets/js/build/omise-one-click-apms.asset.php';
wp_enqueue_script(
"wc-omise-one-click-apms-payments-blocks",
plugin_dir_url( __DIR__ ) . 'assets/js/build/omise-one-click-apms.js',
Expand Down
2 changes: 1 addition & 1 deletion includes/blocks/gateways/omise-block-credit-card.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function get_payment_method_script_handles() {
if ($this->is_active()) {
$script_asset_path = __DIR__ . '/../assets/js/build/credit_card.asset.php';
$script_asset = file_exists( $script_asset_path )
? require_once( $script_asset_path )
? require $script_asset_path
: [
'dependencies' => [],
'version' => '1.0.0'
Expand Down

0 comments on commit 8850a92

Please sign in to comment.