Plugin Directory

Changeset 3422663


Ignore:
Timestamp:
12/18/2025 09:25:13 AM (3 months ago)
Author:
codersaiful
Message:

bk file removed and fixed

Location:
product-sync-master-sheet/tags
Files:
11 added
2 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • product-sync-master-sheet/tags/1.1.3/admin/page-loader.php

    r3395503 r3422663  
    9999        add_submenu_page($menu_slug, $qt_page_title, $qt_menu_title, $capability, 'pssg-quick-edit', [$this, 'quick_edit_page']);
    100100
    101         if ( ! $this->is_premium) {
     101        if (! $this->is_premium) {
    102102            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)
    113109    {
    114110        if ( $this->is_premium) {
     
    128124        include $main_page_file;
    129125    }
    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    }
    131133    public function multiple_site_menu_page_render()
    132134    {
  • product-sync-master-sheet/tags/1.1.3/admin/pages/setup-steps/service_file.php

    r3395503 r3422663  
    1313        <div class="form-field col-lg-8">
    1414            <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' ) ); ?>
    1716               
    1817            </div>
  • product-sync-master-sheet/tags/1.1.3/admin/pages/topbar.php

    r3395503 r3422663  
    4141        <div class="col-lg-5">
    4242            <div class="header-button-wrapper">
    43                 <?php if( pssg_fs()->is_not_paying() ){ ?>
     43                <?php if( ! $this->is_premium){ ?>
    4444                    <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/"
    4646                        target="_blank">
    4747                        <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' ); ?>
    4949                    </a>
    5050                <?php } ?>
  • product-sync-master-sheet/tags/1.1.3/app/core/admin-base.php

    r3395503 r3422663  
    2727    public function __construct()
    2828    {
    29        $this->is_premium = pssg_is_premium();
    30     //    pssg_dd($this->premium);
     29       $this->is_premium = class_exists('PSSGP_Init');
    3130       $this->settings = get_option( $this->setting_key, [] );
    3231       $this->configs = get_option( $this->config_key, [] );
  • product-sync-master-sheet/tags/1.1.3/app/functions.php

    r3395503 r3422663  
    1414        $file = $backtrace['file'] ?? 'Unknown file';
    1515        $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;">';
    1717        echo '<div style="margin-bottom: 10px;color: #3F51B5;">';
    1818        echo "🛠️ <strong>File:</strong> <span style='color:#8d8d8d;'>$file</span> on line <span style='color:#4b4b4b;'>$line</span>";
     
    7171    }
    7272}
    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 not
    89  *
    90  * even old pro version(WC_Min_Max_Quantity) is active then also return true
    91  *
    92  * @return boolean
    93  */
    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 not
    102  *
    103  * @return boolean
    104  */
    105 function pssg_is_premium_installed(){
    106     return pssg_fs()->is_premium();
    107 }
    108 
    10973
    11074
  • product-sync-master-sheet/tags/1.1.3/assets/css/dashboard.css

    r3395503 r3422663  
    55body #wpcontent {
    66    padding-left: 0;
    7 }
    8 .wrap,.wrap.fs-section{
    9     margin: 30px;
    107}
    118body.tracker-added.allow-tracker-body #wpbody-content {
  • product-sync-master-sheet/tags/1.1.3/product-sync-master-sheet.php

    r3395503 r3422663  
    11<?php
    2 
    32/**
    43 * Plugin Name: Sync Master Sheet - Product Sync with Google Sheet for WooCommerce
     
    3837 *
    3938 */
    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
     42if( ! defined( 'PSSG_DEV_VERSION' ) ){
    4543    define( "PSSG_DEV_VERSION", '1.1.3.0' );
    4644}
    47 if ( !defined( 'PSSG_PLUGIN_NAME' ) ) {
     45if( ! defined( 'PSSG_PLUGIN_NAME' ) ){
    4846    define( "PSSG_PLUGIN_NAME", __( 'Sync Master Sheet', 'product-sync-master-sheet' ) );
    4947}
    50 if ( !defined( 'PSSG_BASE_URL' ) ) {
    51     define( "PSSG_BASE_URL", plugins_url() . '/' . plugin_basename( dirname( __FILE__ ) ) . '/' );
     48
     49if( ! defined( 'PSSG_BASE_URL' ) ){
     50    define( "PSSG_BASE_URL", plugins_url() . '/'. plugin_basename( dirname( __FILE__ ) ) . '/' );
    5251}
    53 if ( !defined( 'PSSG_BASE_FILE' ) ) {
     52
     53if( ! defined( 'PSSG_BASE_FILE' ) ){
    5454    define( "PSSG_BASE_FILE", plugin_basename( __FILE__ ) );
    5555}
    56 if ( !defined( 'PSSG_BASE_FOLDER_NAME' ) ) {
    57     define( "PSSG_BASE_FOLDER_NAME", plugin_basename( __DIR__ ) );
     56if( ! defined( 'PSSG_BASE_FOLDER_NAME' ) ){
     57    define( "PSSG_BASE_FOLDER_NAME", plugin_basename(__DIR__) );
    5858}
    59 if ( !defined( 'PSSG_ASSETS_URL' ) ) {
     59
     60if( ! defined( 'PSSG_ASSETS_URL' ) ){
    6061    define( "PSSG_ASSETS_URL", PSSG_BASE_URL . 'assets/' );
    6162}
    62 if ( !defined( 'PSSG_DIR_BASE' ) ) {
     63
     64if( ! defined( 'PSSG_DIR_BASE' ) ){
    6365    define( "PSSG_DIR_BASE", dirname( __FILE__ ) . '/' );
    6466}
    65 if ( !defined( 'PSSG_BASE_DIR' ) ) {
     67if( ! defined( 'PSSG_BASE_DIR' ) ){
    6668    define( "PSSG_BASE_DIR", str_replace( '\\', '/', PSSG_DIR_BASE ) );
    6769}
    68 if ( !defined( 'PSSG_PREFIX' ) ) {
     70if( ! defined( 'PSSG_PREFIX' ) ){
    6971    define( "PSSG_PREFIX", 'pssg' );
    7072}
    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 THE
    76      * `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         }
    10373
    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 {
     74class PSSG_Init
     75{
    11376    public static $instance;
    114 
    11577    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;
    12082        }
    12183        return self::$instance;
    12284    }
    12385
    124     public function __construct() {
    125         add_action( 'plugins_loaded', [$this, 'init'] );
     86    public function __construct()
     87    {
     88        add_action('plugins_loaded', [$this, 'init']);
     89
    12690        //Text domain to be load before init() method call.
    12791        // add_action('plugins_loaded', [$this, 'load_textdomain'], 0);
    12892    }
     93    public function init()
     94    {
     95        include_once PSSG_BASE_DIR . 'autoloader.php';
     96        include_once PSSG_BASE_DIR . 'app/functions.php';
    12997
    130     public function init() {
    13198        $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']);
    134103            return;
    135104        }
    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
    139109        // 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                }
    143114            }
    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
    150118        do_action( 'pssg_init' );
    151119        //Not only Admin/But also frontend handle also added over there, such: API - it's not for login user.
    152120        $admin = new PSSG_Sync_Sheet\Admin\Admin_Loader();
    153121        $admin->init();
     122       
    154123        do_action( 'pssg_loaded' );
    155124    }
     
    157126    // public function load_textdomain() {
    158127    //     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' ); 
    160129    //     $this->textdomain_load = true;
    161130    // }
     131
    162132    /**
    163133     * Displaying Error Notice for
     
    169139     * @return void
    170140     */
    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
    173151        ?>
    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
    178154    }
    179 
    180155}
    181156
    182157PSSG_Init::instance();
    183 if ( !function_exists( 'pssg_load_textdomain' ) ) {
     158
     159if( ! function_exists( 'pssg_load_textdomain' ) ){
    184160    /**
    185161     * Loads the plugin's translated strings.
     
    192168     */
    193169    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' ); 
    195171    }
    196 
     172   
    197173    add_action( 'init', 'pssg_load_textdomain' );
    198174}
Note: See TracChangeset for help on using the changeset viewer.