Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions includes/class-mojito-sinpe-gateway-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,16 @@ public function get_payment_method_script_handles() {
'wp-html-entities',
'wp-i18n',
],
null,
'1.2.0',
true
);
return [ 'moji-sinpe-checkout-js' ];


}
public function get_payment_method_data() {
return [
'title' => $this->get_setting( 'title' ),
'description' => $this->get_setting( 'description' ),
'supports' => $this->get_supported_features(),
'title' => $this->gateway->get_option( 'title' ),
'description' => $this->gateway->get_option( 'description' ),
'supports' => $this->gateway->supports,
];
}

Expand Down
5 changes: 1 addition & 4 deletions includes/class-mojito-sinpe.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,28 +164,25 @@ function(){
);

// Hook the custom function to the 'woocommerce_blocks_loaded' action
/* Working on it, not ready yet
add_action( 'woocommerce_blocks_loaded', function(){

// Check if the required class exists
if ( ! class_exists( 'Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType' ) ) {
return;
}


// Include the custom Blocks Checkout class
require_once MOJITO_SINPE_DIR . 'includes/class-mojito-sinpe-gateway-block.php';

// Hook the registration function to the 'woocommerce_blocks_payment_method_type_registration' action
add_action(
'woocommerce_blocks_payment_method_type_registration',
function( \Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry ) {
// Register an instance of My_Custom_Gateway_Blocks
// Register an instance of Mojito_Sinpe_Gateway_Block
$payment_method_registry->register( new Mojito_Sinpe_Gateway_Block() );
}
);
} );
*/

}

Expand Down