Skip to content
Draft
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
14 changes: 13 additions & 1 deletion woocommerce-gateway-payfast.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
}

require_once plugin_basename( 'includes/class-wc-gateway-payfast.php' );
require_once plugin_basename( 'includes/class-wc-gateway-payfast-privacy.php' );
load_plugin_textdomain( 'woocommerce-gateway-payfast', false, trailingslashit( dirname( plugin_basename( __FILE__ ) ) ) );

Check failure on line 37 in woocommerce-gateway-payfast.php

View workflow job for this annotation

GitHub Actions / test

PluginCheck.CodeAnalysis.DiscouragedFunctions.load_plugin_textdomainFound

load_plugin_textdomain() has been discouraged since WordPress version 4.6. When your plugin is hosted on WordPress.org, you no longer need to manually include this function call for translations under your plugin slug. WordPress will automatically load the translations for you as needed.
add_filter( 'woocommerce_payment_gateways', 'woocommerce_payfast_add_gateway' );
}
add_action( 'plugins_loaded', 'woocommerce_payfast_init', 0 );
Expand Down Expand Up @@ -125,6 +124,19 @@
}
add_action( 'before_woocommerce_init', 'woocommerce_payfast_declare_feature_compatibility' );

/**
* Initialize the privacy class.
*
* Initializes the privacy class for privacy export tools.
*
* @since x.x.x
* @return void
*/
function woocommerce_payfast_privacy_init() {
require_once plugin_basename( 'includes/class-wc-gateway-payfast-privacy.php' );
}
add_action( 'woocommerce_init', 'woocommerce_payfast_privacy_init' );

/**
* Display notice if WooCommerce is not installed.
*
Expand Down
Loading