Changeset 3422663
- Timestamp:
- 12/18/2025 09:25:13 AM (3 months ago)
- Location:
- product-sync-master-sheet/tags
- Files:
-
- 11 added
- 2 deleted
- 7 edited
-
1.1.3.bk (deleted)
-
1.1.3/README.md (added)
-
1.1.3/admin/page-loader.php (modified) (2 diffs)
-
1.1.3/admin/pages/pricing (added)
-
1.1.3/admin/pages/pricing/lifetime.php (added)
-
1.1.3/admin/pages/pricing/manage-data.php (added)
-
1.1.3/admin/pages/pricing/pricing-functions.php (added)
-
1.1.3/admin/pages/pricing/pricing-table-script.js (added)
-
1.1.3/admin/pages/pricing/pricing-table-style.css (added)
-
1.1.3/admin/pages/pricing/table.php (added)
-
1.1.3/admin/pages/pricing/yearly.php (added)
-
1.1.3/admin/pages/setup-steps/service_file.php (modified) (1 diff)
-
1.1.3/admin/pages/topbar.php (modified) (1 diff)
-
1.1.3/app/core/admin-base.php (modified) (1 diff)
-
1.1.3/app/functions.php (modified) (2 diffs)
-
1.1.3/app/handle/dev-helper.md (added)
-
1.1.3/assets/css/dashboard.css (modified) (1 diff)
-
1.1.3/framework/ca-framework/readme.md (added)
-
1.1.3/product-sync-master-sheet.php (modified) (5 diffs)
-
1.1.3/vendor (deleted)
Legend:
- Unmodified
- Added
- Removed
-
product-sync-master-sheet/tags/1.1.3/admin/page-loader.php
r3395503 r3422663 99 99 add_submenu_page($menu_slug, $qt_page_title, $qt_menu_title, $capability, 'pssg-quick-edit', [$this, 'quick_edit_page']); 100 100 101 if ( ! $this->is_premium) {101 if (! $this->is_premium) { 102 102 add_submenu_page($menu_slug, $multiple_site_title, $multiple_site_menu_title, $capability, 'pssg-multisite-connection', [$this, 'multiple_site_menu_page_render']); 103 } 104 } 105 106 /** 107 * To set class on admin body tag 108 * 109 * @param string $classes 110 * @return void 111 */ 112 public function admin_body_class( $classes ) 103 $get_pro_title = __('Get Premium 🛒', 'product-sync-master-sheet'); 104 add_submenu_page($menu_slug, $get_pro_title, $get_pro_title, $capability, 'pssg-pricing', [$this, 'pricing_page_render']); 105 } 106 } 107 108 public function admin_body_class($classes) 113 109 { 114 110 if ( $this->is_premium) { … … 128 124 include $main_page_file; 129 125 } 130 126 public function pricing_page_render() 127 { 128 $this->topbar_sub_title = __("Pricing", 'product-sync-master-sheet'); 129 $pricing_page_file = $this->page_folder_dir . 'pricing/table.php'; 130 if (! is_file($pricing_page_file)) return; 131 include $pricing_page_file; 132 } 131 133 public function multiple_site_menu_page_render() 132 134 { -
product-sync-master-sheet/tags/1.1.3/admin/pages/setup-steps/service_file.php
r3395503 r3422663 13 13 <div class="form-field col-lg-8"> 14 14 <div class="pssg-form-info"> 15 Please <?php pssg_doc_link( 'https://console.cloud.google.com/projectcreate?previousPage=%2Fapis%2Fcredentials', __( "Create a Service JSON file", 'product-sync-master-sheet' ) ); ?> 16 or for existing <?php pssg_doc_link( 'https://console.cloud.google.com/apis/credentials', __( "APIs & Services - Credentials", 'product-sync-master-sheet' ) ); ?> page, foollow screenshot instruction and download the JSON file. 15 Please <?php pssg_doc_link( 'https://console.cloud.google.com/apis/credentials', __( "Create a Service JSON file", 'product-sync-master-sheet' ) ); ?> 17 16 18 17 </div> -
product-sync-master-sheet/tags/1.1.3/admin/pages/topbar.php
r3395503 r3422663 41 41 <div class="col-lg-5"> 42 42 <div class="header-button-wrapper"> 43 <?php if( pssg_fs()->is_not_paying()){ ?>43 <?php if( ! $this->is_premium){ ?> 44 44 <a class="pssg-button reverse" 45 href=" <?php echo esc_url( pssg_fs()->get_upgrade_url() ); ?>"45 href="https://codeastrology.com/downloads/product-sync-master-sheet-premium/" 46 46 target="_blank"> 47 47 <i class="pssg_icon-heart-filled"></i> 48 <?php echo esc_html__( 'Get Upgrade', 'product-sync-master-sheet' ); ?>48 <?php echo esc_html__( 'Get Premium Version', 'product-sync-master-sheet' ); ?> 49 49 </a> 50 50 <?php } ?> -
product-sync-master-sheet/tags/1.1.3/app/core/admin-base.php
r3395503 r3422663 27 27 public function __construct() 28 28 { 29 $this->is_premium = pssg_is_premium(); 30 // pssg_dd($this->premium); 29 $this->is_premium = class_exists('PSSGP_Init'); 31 30 $this->settings = get_option( $this->setting_key, [] ); 32 31 $this->configs = get_option( $this->config_key, [] ); -
product-sync-master-sheet/tags/1.1.3/app/functions.php
r3395503 r3422663 14 14 $file = $backtrace['file'] ?? 'Unknown file'; 15 15 $line = $backtrace['line'] ?? 'Unknown line'; 16 echo '<div style="background: #e1e1e1;border-left: 3px solid #888;padding: 15px;margin: 15px 190px;font-family: monospace;border-radius: 6px;overflow-x: auto;">';16 echo '<div style="background: #e1e1e1;border-left: 3px solid #888;padding: 15px;margin: 15px 0;font-family: monospace;border-radius: 6px;overflow-x: auto;">'; 17 17 echo '<div style="margin-bottom: 10px;color: #3F51B5;">'; 18 18 echo "🛠️ <strong>File:</strong> <span style='color:#8d8d8d;'>$file</span> on line <span style='color:#4b4b4b;'>$line</span>"; … … 71 71 } 72 72 } 73 74 75 if( ! function_exists( 'pssg_fs' ) ){76 function pssg_fs(){77 return new class {78 public function __call($name, $arguments)79 {80 return null;81 }82 83 };84 }85 }86 87 /**88 * Check is premium version active or not89 *90 * even old pro version(WC_Min_Max_Quantity) is active then also return true91 *92 * @return boolean93 */94 function pssg_is_premium(){95 96 if( defined('PSSGP_DEV_VERSION') ) return true;97 98 return pssg_fs()->can_use_premium_code__premium_only();99 }100 /**101 * Check is premium version installed or not102 *103 * @return boolean104 */105 function pssg_is_premium_installed(){106 return pssg_fs()->is_premium();107 }108 109 73 110 74 -
product-sync-master-sheet/tags/1.1.3/assets/css/dashboard.css
r3395503 r3422663 5 5 body #wpcontent { 6 6 padding-left: 0; 7 }8 .wrap,.wrap.fs-section{9 margin: 30px;10 7 } 11 8 body.tracker-added.allow-tracker-body #wpbody-content { -
product-sync-master-sheet/tags/1.1.3/product-sync-master-sheet.php
r3395503 r3422663 1 1 <?php 2 3 2 /** 4 3 * Plugin Name: Sync Master Sheet - Product Sync with Google Sheet for WooCommerce … … 38 37 * 39 38 */ 40 if ( !defined( 'ABSPATH' ) ) { 41 exit; 42 } 43 // Exit if accessed directly 44 if ( !defined( 'PSSG_DEV_VERSION' ) ) { 39 40 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 41 42 if( ! defined( 'PSSG_DEV_VERSION' ) ){ 45 43 define( "PSSG_DEV_VERSION", '1.1.3.0' ); 46 44 } 47 if ( !defined( 'PSSG_PLUGIN_NAME' ) ){45 if( ! defined( 'PSSG_PLUGIN_NAME' ) ){ 48 46 define( "PSSG_PLUGIN_NAME", __( 'Sync Master Sheet', 'product-sync-master-sheet' ) ); 49 47 } 50 if ( !defined( 'PSSG_BASE_URL' ) ) { 51 define( "PSSG_BASE_URL", plugins_url() . '/' . plugin_basename( dirname( __FILE__ ) ) . '/' ); 48 49 if( ! defined( 'PSSG_BASE_URL' ) ){ 50 define( "PSSG_BASE_URL", plugins_url() . '/'. plugin_basename( dirname( __FILE__ ) ) . '/' ); 52 51 } 53 if ( !defined( 'PSSG_BASE_FILE' ) ) { 52 53 if( ! defined( 'PSSG_BASE_FILE' ) ){ 54 54 define( "PSSG_BASE_FILE", plugin_basename( __FILE__ ) ); 55 55 } 56 if ( !defined( 'PSSG_BASE_FOLDER_NAME' ) ){57 define( "PSSG_BASE_FOLDER_NAME", plugin_basename( __DIR__) );56 if( ! defined( 'PSSG_BASE_FOLDER_NAME' ) ){ 57 define( "PSSG_BASE_FOLDER_NAME", plugin_basename(__DIR__) ); 58 58 } 59 if ( !defined( 'PSSG_ASSETS_URL' ) ) { 59 60 if( ! defined( 'PSSG_ASSETS_URL' ) ){ 60 61 define( "PSSG_ASSETS_URL", PSSG_BASE_URL . 'assets/' ); 61 62 } 62 if ( !defined( 'PSSG_DIR_BASE' ) ) { 63 64 if( ! defined( 'PSSG_DIR_BASE' ) ){ 63 65 define( "PSSG_DIR_BASE", dirname( __FILE__ ) . '/' ); 64 66 } 65 if ( !defined( 'PSSG_BASE_DIR' ) ){67 if( ! defined( 'PSSG_BASE_DIR' ) ){ 66 68 define( "PSSG_BASE_DIR", str_replace( '\\', '/', PSSG_DIR_BASE ) ); 67 69 } 68 if ( !defined( 'PSSG_PREFIX' ) ){70 if( ! defined( 'PSSG_PREFIX' ) ){ 69 71 define( "PSSG_PREFIX", 'pssg' ); 70 72 } 71 if ( function_exists( 'pssg_fs' ) ) {72 pssg_fs()->set_basename( false, __FILE__ );73 } else {74 /**75 * DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE76 * `function_exists` CALL ABOVE TO PROPERLY WORK.77 */78 if ( !function_exists( 'pssg_fs' ) ) {79 // Create a helper function for easy SDK access.80 function pssg_fs() {81 global $pssg_fs;82 if ( !isset( $pssg_fs ) ) {83 // Include Freemius SDK.84 require_once dirname( __FILE__ ) . '/vendor/freemius/start.php';85 $pssg_fs = fs_dynamic_init( array(86 'id' => '21608',87 'slug' => 'product-sync-master-sheet',88 'type' => 'plugin',89 'public_key' => 'pk_a8f8ff4086bcaded129abf785fa81',90 'is_premium' => false,91 'has_addons' => false,92 'has_paid_plans' => true,93 'menu' => array(94 'slug' => 'pssg-sync',95 'first-path' => 'admin.php?page=pssg-sync',96 'support' => false,97 ),98 'is_live' => true,99 ) );100 }101 return $pssg_fs;102 }103 73 104 // Init Freemius. 105 pssg_fs(); 106 // Signal that SDK was initiated. 107 do_action( 'pssg_fs_loaded' ); 108 } 109 } 110 include_once PSSG_BASE_DIR . 'autoloader.php'; 111 include_once PSSG_BASE_DIR . 'app/functions.php'; 112 class PSSG_Init { 74 class PSSG_Init 75 { 113 76 public static $instance; 114 115 77 public $textdomain_load = false; 116 117 public static function instance(){118 if ( is_null( self::$instance ) ){119 self::$instance = new self ();78 public static function instance() 79 { 80 if( is_null( self::$instance ) ){ 81 self::$instance = new self; 120 82 } 121 83 return self::$instance; 122 84 } 123 85 124 public function __construct() { 125 add_action( 'plugins_loaded', [$this, 'init'] ); 86 public function __construct() 87 { 88 add_action('plugins_loaded', [$this, 'init']); 89 126 90 //Text domain to be load before init() method call. 127 91 // add_action('plugins_loaded', [$this, 'load_textdomain'], 0); 128 92 } 93 public function init() 94 { 95 include_once PSSG_BASE_DIR . 'autoloader.php'; 96 include_once PSSG_BASE_DIR . 'app/functions.php'; 129 97 130 public function init() {131 98 $is_woocommerce = class_exists( 'WooCommerce' ); 132 if ( !$is_woocommerce ) { 133 add_action( 'admin_notices', [$this, 'missing_wc'] ); 99 100 101 if ( ! $is_woocommerce ) { 102 add_action('admin_notices', [$this, 'missing_wc']); 134 103 return; 135 104 } 136 if ( is_admin() ) { 137 PSSG_Sync_Sheet\Framework\Plugin_Required::display_notice(); 138 } 105 106 if( is_admin() ) PSSG_Sync_Sheet\Framework\Plugin_Required::display_notice(); 107 108 139 109 // Declare compatibility with custom order tables for WooCommerce. 140 add_action( 'before_woocommerce_init', function () { 141 if ( class_exists( '\\Automattic\\WooCommerce\\Utilities\\FeaturesUtil' ) ) { 142 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); 110 add_action( 'before_woocommerce_init', function(){ 111 if ( class_exists('\Automattic\WooCommerce\Utilities\FeaturesUtil') ) { 112 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true); 113 } 143 114 } 144 } ); 145 $pssg_premium_loader = dirname( __FILE__ ) . '/premium/premium-loader.php'; 146 if ( pssg_fs()->can_use_premium_code__premium_only() && file_exists( $pssg_premium_loader ) ) { 147 //wcmmq_fs()->can_use_premium_code__premium_only() && 148 include_once $pssg_premium_loader; 149 } 115 ); 116 117 150 118 do_action( 'pssg_init' ); 151 119 //Not only Admin/But also frontend handle also added over there, such: API - it's not for login user. 152 120 $admin = new PSSG_Sync_Sheet\Admin\Admin_Loader(); 153 121 $admin->init(); 122 154 123 do_action( 'pssg_loaded' ); 155 124 } … … 157 126 // public function load_textdomain() { 158 127 // if( $this->textdomain_load ) return; 159 // load_plugin_textdomain( 'product-sync-master-sheet', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 128 // load_plugin_textdomain( 'product-sync-master-sheet', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 160 129 // $this->textdomain_load = true; 161 130 // } 131 162 132 /** 163 133 * Displaying Error Notice for … … 169 139 * @return void 170 140 */ 171 public function missing_wc() { 172 $message = sprintf( esc_html__( '"%1$s" requires "%2$s" to be installed and activated.', 'product-sync-master-sheet' ), '<strong>' . PSSG_PLUGIN_NAME . '</strong>', '<strong><a href="' . esc_url( 'https://wordpress.org/plugins/woocommerce/' ) . '" target="_blank">' . esc_html__( 'WooCommerce', 'product-sync-master-sheet' ) . '</a></strong>' ); 141 public function missing_wc() 142 { 143 144 145 $message = sprintf( 146 esc_html__('"%1$s" requires "%2$s" to be installed and activated.', 'product-sync-master-sheet'), 147 '<strong>' . PSSG_PLUGIN_NAME . '</strong>', 148 '<strong><a href="' . esc_url('https://wordpress.org/plugins/woocommerce/') . '" target="_blank">' . esc_html__('WooCommerce', 'product-sync-master-sheet') . '</a></strong>' 149 ); 150 173 151 ?> 174 <div class="notice notice-error"><p><?php 175 echo wp_kses_post( $message ); 176 ?></p></div> 177 <?php 152 <div class="notice notice-error"><p><?php echo wp_kses_post( $message ) ?></p></div> 153 <?php 178 154 } 179 180 155 } 181 156 182 157 PSSG_Init::instance(); 183 if ( !function_exists( 'pssg_load_textdomain' ) ) { 158 159 if( ! function_exists( 'pssg_load_textdomain' ) ){ 184 160 /** 185 161 * Loads the plugin's translated strings. … … 192 168 */ 193 169 function pssg_load_textdomain() { 194 load_plugin_textdomain( 'product-sync-master-sheet', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 170 load_plugin_textdomain( 'product-sync-master-sheet', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 195 171 } 196 172 197 173 add_action( 'init', 'pssg_load_textdomain' ); 198 174 }
Note: See TracChangeset
for help on using the changeset viewer.