diff --git a/includes/class-mojito-sinpe-gateway-block.php b/includes/class-mojito-sinpe-gateway-block.php index 06400ce..92b8b66 100644 --- a/includes/class-mojito-sinpe-gateway-block.php +++ b/includes/class-mojito-sinpe-gateway-block.php @@ -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, ]; } diff --git a/includes/class-mojito-sinpe.php b/includes/class-mojito-sinpe.php index 6855a6e..8f3c16c 100644 --- a/includes/class-mojito-sinpe.php +++ b/includes/class-mojito-sinpe.php @@ -164,7 +164,6 @@ 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 @@ -172,7 +171,6 @@ function(){ return; } - // Include the custom Blocks Checkout class require_once MOJITO_SINPE_DIR . 'includes/class-mojito-sinpe-gateway-block.php'; @@ -180,12 +178,11 @@ function(){ 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() ); } ); } ); - */ }