fnwc_gateway_deactivation

The WooCommerce Payment Gateway for Saferpay fnwc gateway deactivation function.

Description

fnwc_gateway_deactivation(); 

Usage

  1. if ( !function_exists( 'fnwc_gateway_deactivation' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-payment-gateway-for-saferpay/fn-plugin.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = fnwc_gateway_deactivation(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/fn-plugin.php  
  1. function fnwc_gateway_deactivation() 
  2. $pid = get_option( 'saferpay_page_id', 0); 
  3.  
  4. if($pid > 0) 
  5. @wp_delete_post($pid, true); 
  6.  
  7. delete_option('saferpay_page_id');