PHP Classes

File: wc-correios.php

Recommend this page to a friend!
  Classes of Julio Cezar Kronbauer   PHP WooCommerce Correios   wc-correios.php   Download  
File: wc-correios.php
Role: Application script
Content type: text/plain
Description: Application script
Class: PHP WooCommerce Correios
Woocommerce plugin for shipping via Correios
Author: By
Last change: Improved how check and install dependencies and fixed coding standards
Date: 7 years ago
Size: 506 bytes
 

Contents

Class file image Download
<?php
/**
 * Update main file for legacy from installations.
 *
 * @package WooCommerce_Correios
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

// Update the main file.
$active_plugins = get_option( 'active_plugins', array() );

foreach (
$active_plugins as $key => $active_plugin ) {
    if (
strstr( $active_plugin, '/wc-correios.php' ) ) {
       
$active_plugins[ $key ] = str_replace( '/wc-correios.php', '/woocommerce-correios.php', $active_plugin );
    }
}

update_option( 'active_plugins', $active_plugins );