Compare commits

..

No commits in common. "fc03aaabc8814e63e620d1d1734430fd17e7d6b2" and "main" have entirely different histories.

3 changed files with 7 additions and 6 deletions

View file

@ -6,7 +6,7 @@
## Description
This plugin implements an easy way to track payments processed using ZGo Payment Gateway for WooCommerce.
## Installation

View file

@ -23,7 +23,6 @@ class Submenu_Page {
public $_path;
function __construct( $path ) {
global $wpdb;
$this->_path = $path;
$this->console_log('$_path -> '. $this->_path);
@ -40,7 +39,7 @@ class Submenu_Page {
'pg_limit integer not null default 0,' .
'pg_dt datetime default current_timestamp, '.
'unique lstix (pg_ix) );';
$wpdb->query($sql);
$GLOBALS['wpdb']->query($sql);
if ( ! $this->pmtLstRdy() ) {
//
@ -59,7 +58,7 @@ class Submenu_Page {
$this->_npages . ',' .
$this->_offset . ',' .
$this->_limit .')';
$wpdb->query($sql);
$GLOBALS['wpdb']->query($sql);
} else {
// Load last state
$params = $this->pmtLstParams();
@ -71,12 +70,12 @@ class Submenu_Page {
//
// Calc new number of pages
//
$this->_npages = intdiv($this->_nrows,$this->_limit);
$this->_npages = intdiv($this->_npages,$this->_limit);
if ( $this->_nrows > ($this->_npages*$this->_limit) ) {
$this->_npages++;
}
$sql = 'update zgo_pmtlst set pg_npages=' . $this->_npages . ' where pg_ix=1';
$wpdb->query($sql);
$GLOBALS['wpdb']->query($sql);
}
}
}
@ -117,6 +116,7 @@ class Submenu_Page {
}
public function render() {
global $wpdb;
$currentDate = date('Y-m-d H:i:s');

View file

@ -37,6 +37,7 @@ add_action( 'plugins_loaded', 'zgopmtlist_plugin' );
function zgopmtlist_plugin() {
$path = str_replace('zgopmtlist/','',plugin_dir_path( __FILE__ ));
$plugin = new Submenu( new Submenu_Page($path) );
$plugin->init();