Plugin Directory

Changeset 2209552


Ignore:
Timestamp:
12/10/2019 08:09:33 PM (6 years ago)
Author:
majemedia
Message:

Updating display of shipping methods on no po boxes settings screen

Location:
maje-wc-no-po-boxes/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • maje-wc-no-po-boxes/trunk

    • Property svn:ignore
      •  

        old new  
        11.idea
         2.git
         3.gitignore
         4assets
  • maje-wc-no-po-boxes/trunk/MajeMedia-WC-No-PO-Boxes.php

    r2205468 r2209552  
    55Plugin URI:  https://majemedia.com/plugins/no-po-boxes
    66Description: Restricts the use of PO Boxes during WooCommerce checkout. It contains a configurable message to display when a PO Box is attempted to be used. Will not limit the use of PO Boxes for carts that only contain digital products.
    7 Version:     2.0.8
     7Version:     2.0.9
    88Author:      Maje Media LLC
    99Author URI:  https://majemedia.com
  • maje-wc-no-po-boxes/trunk/README.md

    r2205468 r2209552  
    124124
    125125## Changelog
     126### 2.0.9
     127* Github #16: Updated the settings screen display of shipping methods to display the title of the shipping method instead of the shipping method type title.
     128
    126129### 2.0.8
    127130* Tested to WordPress 5.3
  • maje-wc-no-po-boxes/trunk/autoload.php

    r1769168 r2209552  
    1515    require_once realpath( dirname( __FILE__ ) ) . $file;
    1616}
     17
     18if( ! function_exists( '_log' ) ) {
     19
     20    /**
     21     * @description Takes any message and sends it to the error_log. Due to how php's serialize works (will add binary characters) and that error_log will truncate when it hits a binary character a str_replace is used.
     22     *
     23     * @param $message mixed anything you want to print out
     24     */
     25    function _log( $message = '', BOOL $backtrace = FALSE ) {
     26
     27        if( $backtrace || func_num_args() === 0 ) {
     28
     29            $backtrace = debug_backtrace();
     30            error_log( print_r( [ 'file' => $backtrace[ 0 ][ 'file' ], 'line' => $backtrace[ 0 ][ 'line' ] ], TRUE ) );
     31
     32        }
     33
     34        if( func_num_args() !== 0 ) {
     35            error_log( str_replace( "\0", "(NULL)", print_r( $message, TRUE ) ) );
     36        }
     37
     38    }
     39
     40}
  • maje-wc-no-po-boxes/trunk/classes/MWNPB_DashboardSettings.php

    r1769654 r2209552  
    138138
    139139            $output .= <<<EOT
     140<p>
     141<label for="{$optionName}[{$methodId}]">{$Method->title}</label>:
    140142<select name="{$optionName}[{$methodId}]" id="{$optionName}[{$methodId}]">
    141143<option value="no" {$selectedNo}>No PO</option>
    142144<option value="yes" {$selectedYes}>Allow PO</option>
    143 </select> : <label for="{$optionName}[{$methodId}]">{$Method->method_title}</label><br />
     145</select>
     146</p>
    144147EOT;
    145148
  • maje-wc-no-po-boxes/trunk/readme.txt

    r2205468 r2209552  
    55Tested up to: 5.3
    66Requires PHP: 5.6
    7 Stable tag: 2.0.8
     7Stable tag: 2.0.9
    88License: GPL2
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3838
    3939== Changelog ==
     40= 2.0.9 =
     41* Github #16: Updated the settings screen display of shipping methods to display the title of the shipping method instead of the shipping method type title.
    4042
    4143= 2.0.8 =
Note: See TracChangeset for help on using the changeset viewer.