Plugin Directory

Changeset 2958627


Ignore:
Timestamp:
08/26/2023 02:28:20 PM (3 years ago)
Author:
wptaskforce
Message:

compatibility with branch manager for dynamic prefix and suffix per branch

Location:
wpcargo
Files:
790 added
3 edited

Legend:

Unmodified
Added
Removed
  • wpcargo/trunk/admin/classes/class-wpcargo.php

    r2940430 r2958627  
    350350        return $all_wpcargo_users;
    351351    }
    352     protected function prefix(){
     352    public function prefix(){
    353353        $options    = $this->settings();
    354354        $prefix     = '';
     
    356356            $prefix = trim( $options['wpcargo_title_prefix'] );
    357357        }
    358         return apply_filters( 'wpcargo_prefix', esc_html( $prefix ) );
    359     }
    360     protected function suffix(){
     358        return apply_filters( 'wpcargo_prefix', $prefix );
     359    }
     360    public function suffix(){
    361361        $suffix = get_option('wpcargo_title_suffix');
    362         return apply_filters( 'wpcargo_suffix', esc_html( $suffix ) );
     362        return apply_filters( 'wpcargo_suffix', $suffix );
    363363    }
    364364    protected function tax(){
     
    389389        }
    390390        $rand_number    = str_pad( wp_rand( 0, $numstr ), $numdigit, "0", STR_PAD_LEFT );
    391         $shipment_title = $this->prefix.$rand_number.$this->suffix;
     391        $prefix_extra= apply_filters( 'wpcargo_prefix_extra', $this->prefix  );
     392        $suffix_extra =apply_filters( 'wpcargo_suffix_extra', $this->suffix  );
     393        $shipment_title =$prefix_extra.$rand_number.$suffix_extra;
     394       
    392395        $shipment_title = apply_filters( 'wpcargo_generated_shipment_number', $shipment_title, $rand_number );
    393396        if( get_option('wpcargo_restrict_duplicate') ){
  • wpcargo/trunk/readme.txt

    r2957081 r2958627  
    66Tested up to: 6.3
    77Requires PHP: 7.4
    8 Stable tag: 6.13.2
     8Stable tag: 6.13.3
    99License: GPLv3
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    132132
    133133== Changelog ==
     134= 6.13.3   
     135- Hook to allow branch  for multi prefix and suffix
     136
    134137= 6.13.2   
    135138- Fix   issue hook undefine $view
  • wpcargo/trunk/wpcargo.php

    r2957081 r2958627  
    77 * Text Domain: wpcargo
    88 * Domain Path: /languages
    9  * Version: 6.13.2
     9 * Version: 6.13.3
    1010 */
    1111/*
     
    3333//* Defined constant
    3434define( 'WPCARGO_TEXTDOMAIN', 'wpcargo' );
    35 define( 'WPCARGO_VERSION', '6.13.2' );
     35define( 'WPCARGO_VERSION', '6.13.3' );
    3636define( 'WPCARGO_DB_VERSION', '1.0.0' );
    3737define( 'WPCARGO_FILE_DIR', __FILE__  );
Note: See TracChangeset for help on using the changeset viewer.