Plugin Directory

Changeset 3280905


Ignore:
Timestamp:
04/24/2025 12:06:16 PM (11 months ago)
Author:
nitin247
Message:

Fix textdomain

Location:
wc-place-order-without-payment
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wc-place-order-without-payment/tags/2.7.0/inc/WPOWP_Front.php

    r3275682 r3280905  
    125125                }
    126126            }
     127            $this->hide_prices_sitewide__premium_only();
    127128        }
    128129
  • wc-place-order-without-payment/tags/2.7.0/wc-place-order-without-payment.php

    r3279799 r3280905  
    5050defined( 'WPOWP_DIR' ) or define( 'WPOWP_DIR', plugin_dir_path( WPOWP_FILE ) );
    5151defined( 'WPOWP_URL' ) or define( 'WPOWP_URL', plugins_url( '/', WPOWP_FILE ) );
    52 defined( 'WPOWP_NAME' ) or define( 'WPOWP_NAME', __( 'Place Order Without Payment', 'wpowp' ) );
    53 defined( 'WPOWP_SHORT_NAME' ) or define( 'WPOWP_SHORT_NAME', __( 'Place Order', 'wpowp' ) );
    5452defined( 'WPOWP_PLUGIN_SLUG' ) or define( 'WPOWP_PLUGIN_SLUG', 'wpowp-settings' );
    5553defined( 'WPOWP_PLUGIN_PREFIX' ) or define( 'WPOWP_PLUGIN_PREFIX', 'wpowp-' );
    5654defined( 'WPOWP_FORM_PREFIX' ) or define( 'WPOWP_FORM_PREFIX', 'wpowp_' );
    5755defined( 'WPOWP_TEMPLATES' ) or define( 'WPOWP_TEMPLATES', WPOWP_DIR . 'templates/' );
    58 defined( 'WPOWP_API_ERROR_TEXT' ) or define( 'WPOWP_API_ERROR_TEXT', __( 'Error Processing data!', 'wpowp' ) );
    59 defined( 'WPOWP_ADMIN_CONFIRM_RESET_TEXT' ) or define( 'WPOWP_ADMIN_CONFIRM_RESET_TEXT', __( 'This action is not recoverable. Are you sure you want to reset this setting?', 'wpowp' ) );
    6056if ( !function_exists( 'WPOWP\\wpowp_fs' ) ) {
    6157    // Create a helper function for easy SDK access.
     
    109105         */
    110106        private function __construct() {
     107            // Plugin Init
    111108            add_action( 'init', array($this, 'before_plugin_load') );
    112             // On plugin init
    113             add_action( 'plugins_loaded', array($this, 'on_plugin_load'), 10 );
    114109            // Add action links
    115110            add_action( 'plugin_action_links_' . plugin_basename( __FILE__ ), array($this, 'action_links') );
    116111            // Run Plugin
    117112            add_action( 'wp_loaded', array($this, 'run_plugin'), 20 );
    118             add_action( 'plugins_loaded', array($this, 'init_admin'), 20 );
     113            add_action( 'init', array($this, 'init_admin'), 20 );
    119114            // HPOS Compatibility
    120115            add_action( 'before_woocommerce_init', array($this, 'declare_compatibility'), 30 );
     
    129124         */
    130125        public function before_plugin_load() {
     126            defined( 'WPOWP_NAME' ) or define( 'WPOWP_NAME', __( 'Place Order Without Payment', 'wpowp' ) );
     127            defined( 'WPOWP_SHORT_NAME' ) or define( 'WPOWP_SHORT_NAME', __( 'Place Order', 'wpowp' ) );
     128            defined( 'WPOWP_API_ERROR_TEXT' ) or define( 'WPOWP_API_ERROR_TEXT', __( 'Error Processing data!', 'wpowp' ) );
     129            defined( 'WPOWP_ADMIN_CONFIRM_RESET_TEXT' ) or define( 'WPOWP_ADMIN_CONFIRM_RESET_TEXT', __( 'This action is not recoverable. Are you sure you want to reset this setting?', 'wpowp' ) );
    131130            if ( !class_exists( 'woocommerce' ) ) {
    132131                add_action( 'admin_notices', array($this, 'wc_not_active') );
     
    137136                return;
    138137            }
    139         }
    140 
    141         /**
    142          * Before Plugin Load
    143          *
    144          * @return void
    145          */
    146         public function on_plugin_load() {
    147             load_plugin_textdomain( 'wpowp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
     138            load_plugin_textdomain( 'wpowp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
    148139        }
    149140
  • wc-place-order-without-payment/trunk/inc/WPOWP_Front.php

    r3275682 r3280905  
    125125                }
    126126            }
     127            $this->hide_prices_sitewide__premium_only();
    127128        }
    128129
  • wc-place-order-without-payment/trunk/wc-place-order-without-payment.php

    r3279799 r3280905  
    5050defined( 'WPOWP_DIR' ) or define( 'WPOWP_DIR', plugin_dir_path( WPOWP_FILE ) );
    5151defined( 'WPOWP_URL' ) or define( 'WPOWP_URL', plugins_url( '/', WPOWP_FILE ) );
    52 defined( 'WPOWP_NAME' ) or define( 'WPOWP_NAME', __( 'Place Order Without Payment', 'wpowp' ) );
    53 defined( 'WPOWP_SHORT_NAME' ) or define( 'WPOWP_SHORT_NAME', __( 'Place Order', 'wpowp' ) );
    5452defined( 'WPOWP_PLUGIN_SLUG' ) or define( 'WPOWP_PLUGIN_SLUG', 'wpowp-settings' );
    5553defined( 'WPOWP_PLUGIN_PREFIX' ) or define( 'WPOWP_PLUGIN_PREFIX', 'wpowp-' );
    5654defined( 'WPOWP_FORM_PREFIX' ) or define( 'WPOWP_FORM_PREFIX', 'wpowp_' );
    5755defined( 'WPOWP_TEMPLATES' ) or define( 'WPOWP_TEMPLATES', WPOWP_DIR . 'templates/' );
    58 defined( 'WPOWP_API_ERROR_TEXT' ) or define( 'WPOWP_API_ERROR_TEXT', __( 'Error Processing data!', 'wpowp' ) );
    59 defined( 'WPOWP_ADMIN_CONFIRM_RESET_TEXT' ) or define( 'WPOWP_ADMIN_CONFIRM_RESET_TEXT', __( 'This action is not recoverable. Are you sure you want to reset this setting?', 'wpowp' ) );
    6056if ( !function_exists( 'WPOWP\\wpowp_fs' ) ) {
    6157    // Create a helper function for easy SDK access.
     
    109105         */
    110106        private function __construct() {
     107            // Plugin Init
    111108            add_action( 'init', array($this, 'before_plugin_load') );
    112             // On plugin init
    113             add_action( 'plugins_loaded', array($this, 'on_plugin_load'), 10 );
    114109            // Add action links
    115110            add_action( 'plugin_action_links_' . plugin_basename( __FILE__ ), array($this, 'action_links') );
    116111            // Run Plugin
    117112            add_action( 'wp_loaded', array($this, 'run_plugin'), 20 );
    118             add_action( 'plugins_loaded', array($this, 'init_admin'), 20 );
     113            add_action( 'init', array($this, 'init_admin'), 20 );
    119114            // HPOS Compatibility
    120115            add_action( 'before_woocommerce_init', array($this, 'declare_compatibility'), 30 );
     
    129124         */
    130125        public function before_plugin_load() {
     126            defined( 'WPOWP_NAME' ) or define( 'WPOWP_NAME', __( 'Place Order Without Payment', 'wpowp' ) );
     127            defined( 'WPOWP_SHORT_NAME' ) or define( 'WPOWP_SHORT_NAME', __( 'Place Order', 'wpowp' ) );
     128            defined( 'WPOWP_API_ERROR_TEXT' ) or define( 'WPOWP_API_ERROR_TEXT', __( 'Error Processing data!', 'wpowp' ) );
     129            defined( 'WPOWP_ADMIN_CONFIRM_RESET_TEXT' ) or define( 'WPOWP_ADMIN_CONFIRM_RESET_TEXT', __( 'This action is not recoverable. Are you sure you want to reset this setting?', 'wpowp' ) );
    131130            if ( !class_exists( 'woocommerce' ) ) {
    132131                add_action( 'admin_notices', array($this, 'wc_not_active') );
     
    137136                return;
    138137            }
    139         }
    140 
    141         /**
    142          * Before Plugin Load
    143          *
    144          * @return void
    145          */
    146         public function on_plugin_load() {
    147             load_plugin_textdomain( 'wpowp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
     138            load_plugin_textdomain( 'wpowp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
    148139        }
    149140
Note: See TracChangeset for help on using the changeset viewer.