Skip to content

Commit

Permalink
try rendering w/required resources
Browse files Browse the repository at this point in the history
  • Loading branch information
faisal-alvi committed Sep 16, 2024
1 parent ccd4ebf commit 1196c7c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions includes/Framework/PaymentGateway/Payment_Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ public function __construct( $id, $plugin, $args ) {

// Enqueue the necessary scripts & styles
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); // <=-- <=--

// add API request logging
$this->add_api_request_logging();
Expand Down
3 changes: 2 additions & 1 deletion includes/Gateway/Digital_Wallet.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public function __construct( $gateway ) {

if ( 'yes' === $gateway->get_option( 'enabled', 'no' ) && $this->is_digital_wallet_enabled() ) {
add_action( 'wp', array( $this, 'init' ) );
add_action( 'admin_init', array( $this, 'init' ) );
add_action( 'admin_notices', array( $this, 'admin_notices' ) );
}

Expand Down Expand Up @@ -125,7 +126,7 @@ public function init() {
add_action( 'before_woocommerce_pay', array( $this, 'render_button' ) );
}

$page = $this->get_current_page();
$page = is_admin() ? 'checkout' : $this->get_current_page();
$payment_request = false;

try {
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/digital-wallets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const squareDigitalWalletsMethod = {
name: 'square-credit-card',
paymentMethodId: 'square_credit_card',
content: <Content />,
edit: <MockButtons />,
edit: <Content />,
canMakePayment: () => {
const isSquareConnected =
getSquareServerData().applicationId &&
Expand Down

0 comments on commit 1196c7c

Please sign in to comment.