Plugin Directory

Changeset 2265491


Ignore:
Timestamp:
03/22/2020 07:13:14 PM (6 years ago)
Author:
advshipmgr
Message:

Compatibility with latest WordPress and Woo Commerce version’s.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asm-manager/trunk/asmplsww.php

    r2265310 r2265491  
    11<?php
     2
    23/*
    3 Plugin Name: Advanced Shipping Manager
    4 Plugin URI: http://wordpress.org/plugins/asm
    5 Description: Advanced Shipping Manager Integration to a New Platform
    6 Author: ASM
    7 Developer: ASM
    8 Version: 1.0.0
    9 WC requires at least: 3.7.1
    10 WC tested up to: 4.0.1
    11 Author URI: https://www.softwebwork.net
    12 */
     4  Plugin Name: Advanced Shipping Manager
     5  Plugin URI: http://wordpress.org/plugins/asm
     6  Description: Advanced Shipping Manager Integration to a New Platform
     7  Author: ASM
     8  Developer: ASM
     9  Version: 1.0.0
     10  WC requires at least: 3.7.1
     11  WC tested up to: 4.0.1
     12  Author URI: https://www.softwebwork.net
     13 */
    1314
    1415if (!defined('ABSPATH')) {
    1516    exit; // Exit if accessed directly
    1617}
     18
     19// If Woocommerce plugin installed
    1720if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
    18 
    1921
    2022    if (!class_exists('ASMPLSWW_Admin')) {
     
    2628        include_once 'includes/asmplsww_shipping_method.php';
    2729    }
    28    
    29     add_action('woocommerce_shipping_init', 'asmplsww_shipping_method_init');
    3030
    31     function asmplsww_shipping_method_add($methods)
    32     {
    33         $methods['asmplsww'] = 'ASMPLSWW_Shipping_Method';
    34         return $methods;
    35     }
     31    add_action('woocommerce_shipping_init', 'asmplsww_shipping_method_init');
    3632
    37     add_filter('woocommerce_shipping_methods', 'asmplsww_shipping_method_add');
     33    function asmplsww_shipping_method_add($methods) {
     34        $methods['asmplsww'] = 'ASMPLSWW_Shipping_Method';
     35        return $methods;
     36    }
    3837
     38    add_filter('woocommerce_shipping_methods', 'asmplsww_shipping_method_add');
    3939}
Note: See TracChangeset for help on using the changeset viewer.