[oik] plugins.com

WordPress plugins and themes

  • Home
  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
    • Bespoke oik plugins
  • Shortcodes
    • Shortcode examples
  • Blocks
    • Block examples
  • APIs
    • ALL action and filter hooks
  • Blog

OIK_Weight_Zone_Shipping::__construct() – Constructor for OIK_Weight_Zone_Shipping class

Description

Constructor for OIK_Weight_Zone_Shipping class

Sets the ID to 'oik_weight_zone_shipping' Values for supports are:

  • shipping-zones Shipping zone functionality + instances
  • instance-settings Instance settings screens.
  • settings Non-instance settings screens. Enabled by default for BW compatibility with methods before instances existed.
  • instance-settings-modal Allows the instance settings to be loaded within a modal in the zones UI.
For instance-settings to work we need to set $this->instance_id

Usage

OIK_Weight_Zone_Shipping::__construct( $instance_id );

Parameters

$instance_id
( mixed ) optional –

Returns

void

Source

File name: oik-weight-zone-shipping/class-oik-weight-zone-shipping.php
Lines:
1 to 18 of 18
  function __construct( $instance_id = 0 ) {
      //Uncomment to reproduce issue #28648
      //bw_backtrace();
    //$shipping_zones = WC_Shipping_Zones::get_zones();

    parent::__construct( $instance_id );
    //bw_trace2( );
    //bw_backtrace();
    $this->supports = array( "shipping-zones", "instance-settings", "instance-settings-modal" );
    $this->id = 'oik_weight_zone_shipping'; 
    $this->method_title = __( 'Weight Zone', 'oik-weight-zone-shipping' );
    $this->method_description    = __( 'Lets you charge based on cart weight.', 'oik-weight-zone-shipping' );
    $this->admin_page_heading     = __( 'Weight and zone based shipping', 'oik-weight-zone-shipping' );
    $this->admin_page_description = __( 'Define rates for shipping by weight and zone', 'oik-weight-zone-shipping' );
    //add_action( 'woocommerce_update_options_shipping_oik_weight_zone_shipping', array( $this, 'process_admin_options' ) );
    add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
    $this->init();
  }
 
 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      1 to 2 of 2
      • bw_trace2() – Trace $value to the trace log file if tracing is active
      • OIK_Weight_Zone_Shipping::init() – Initialise the shipping method

      Call hooks

      Function name: OIK_Weight_Zone_Shipping::__construct
      Class ref: OIK_Weight_Zone_Shipping
      Plugin ref: oik weight zone shipping
      Version: 0.2.13
      Sourcefile: class-oik-weight-zone-shipping.php
      File ref: class-oik-weight-zone-shipping.php
      Deprecated?: No
      API Letters: O,S,W,Z

      Published: April 5, 2017 | Last updated: April 5, 2017

      Information

      Function name: OIK_Weight_Zone_Shipping::__construct
      Class ref: OIK_Weight_Zone_Shipping
      Plugin ref: oik weight zone shipping
      Version: 0.2.13
      Sourcefile: class-oik-weight-zone-shipping.php
      File ref: class-oik-weight-zone-shipping.php
      Deprecated?: No
      API Letters: O,S,W,Z

      Recent plugin updates

      oik-weight-zone-shipping v0.2.13 oik-weight-zone-shipping v0.2.13 has been tested with WooCommerce 10.1.2 and WordPress 6.8.2 ...
      SB Children Block v1.3.0 Upgrade to SB Children Block v1.3.0 for support for PHP 8.3 and PHP 8.4  ...
      oik v4.15.3 Update to oik v4.15.3 for a couple of security fixes. Tested with WordPress 6.8.2 ...
      oik-privacy-policy v1.4.9 Update to oik-privacy-policy v1.4.9 for a security fix. Tested with WordPress 6.8.2 and PHP 8.3 and PHP 8.4 ...
      oik-nivo-slider v1.17.0 oik-nivo-slider v1.17.0 introduces the Nivo slider block - oik-nivo-slider/nivo. ...

      Plugins

      • All Plugins
      • oik base plugin
      • FREE oik plugins
      • WordPress plugins
      • Premium oik plugins

      Themes

      • FREE themes
      • Bespoke themes
      • Premium themes

      Blocks

      • All Blocks
      • Block examples
      • About Blocks

      Shortcodes

      • All Shortcodes
      • Shortcode examples
      • About Shortcodes

      Reference

      • About APIs
      • All APIs
      • All Classes
      • All Files
      • All Hooks

      Support

      • Contact
      • Cookies policy
      • Get API key
      • Privacy
      • Request support
      • Sitemap
      • Stay informed
      • Terms and Conditions
      oik-plugins
      Email: herb@bobbingwide.com

      Weight shipping plugins

      Find out which cart weight shipping plugin you need for your WooCommerce site.
      Which cart weight based plugin do I need?

      Site:  www.oik-plugins.com
      © Copyright oik-plugins 2011-2025. All rights reserved.


      Website designed and developed by Herb Miller of Bobbing Wide
      Proudly powered by WordPress and oik-plugins

      WordPress version: 6.8.3

      Gutenberg version: 21.7.0

      PHP version: 8.2.29