Skip to content

Commit

Permalink
Update chargily.php
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Developer authored Mar 11, 2024
1 parent 860b3ee commit a344866
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions chargily.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*Description: The easiest and free way to integrate e-payment API through EDAHABIA of Algerie Poste and CIB of SATIM into your Wordpress/WooCommerce platform.
*Author: Chargily
Author URI: https://chargily.com
*Version: 2.1.4
*Version: 2.1.6
*Text Domain: chargilytextdomain
*Domain Path: /languages
*/
Expand Down Expand Up @@ -37,28 +37,18 @@ function wc_chargily_gateway_plugin_action_links( $links ) {
add_action('wp_enqueue_scripts', 'chargily_css_loader_front');
function chargily_css_loader_front() {
if ( is_checkout() ) {
wp_enqueue_style('chargily-style-front', plugins_url('/assets/css/css-front.css?v=114', __FILE__));
wp_enqueue_style('chargily-style-front', plugins_url('/assets/css/css-front.css?v=116', __FILE__));
if (is_rtl()) {
wp_enqueue_style('rtl-style', plugins_url('/assets/css/css-front-rtl.css?v=114', __FILE__));
wp_enqueue_style('rtl-style', plugins_url('/assets/css/css-front-rtl.css?v=116', __FILE__));
}
}
}

function chargily_js_loader_front() {
wp_enqueue_script( 'chargily-script-front', plugins_url('/assets/js/js-front.js?v=114', __FILE__), array('jquery'), null, true );
wp_enqueue_script( 'chargily-script-front', plugins_url('/assets/js/js-front.js?v=116', __FILE__), array('jquery'), null, true );
}
add_action( 'wp_enqueue_scripts', 'chargily_js_loader_front' );

function wc_chargilyv2_set_default_payment_gateway( $gateways ) {
if ( isset( $gateways['chargily_pay'] ) ) {
$chargily_gateway = $gateways['chargily_pay'];
unset( $gateways['chargily_pay'] );
$gateways = array_merge( array( 'chargily_pay' => $chargily_gateway ), $gateways );
}
return $gateways;
}
add_filter( 'woocommerce_available_payment_gateways', 'wc_chargilyv2_set_default_payment_gateway', 999 );

add_action('woocommerce_blocks_loaded', 'register_chargily_pay_blocks');
function register_chargily_pay_blocks() {
if (!class_exists('Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType')) {
Expand Down

0 comments on commit a344866

Please sign in to comment.