Plugin Directory

Changeset 3492619


Ignore:
Timestamp:
03/27/2026 11:57:31 AM (5 days ago)
Author:
invoked
Message:

bug fixes and improvements for multisite network

Location:
biblio-dispatch/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • biblio-dispatch/trunk/bibliodispatch-plugin.php

    r3486480 r3492619  
    33Plugin Name: Print Management with Biblio Dispatch
    44Description: The Print Management with Biblio Dispatch plugin streamlines print services by enabling user registration and login.With seamless integration into your WordPress site, it enhances order management and improves efficiency for your print service operations.
    5 Version: 1.3.3
     5Version: 1.3.4
    66License: GPL2
    77License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    101101    return $license_secret_key;
    102102}
     103
    103104function check_license_status($license_key) {
    104105    $license_secret_key=fetch_license_secret_key();
     
    179180    }
    180181}
     182
    181183function activate_license($license_key) {
    182184    $license_secret_key=fetch_license_secret_key();
     
    306308    wp_enqueue_style('wp-pointer');
    307309
    308     $user_id = get_current_user_id();
    309     $clicked = get_option('biblio_portal_clicked_' . $user_id, 0);
     310    $clicked = get_option('biblio_portal_clicked', 0);
    310311
    311312    if (!$clicked) {
     
    337338function check_plugin_configuration_prompt() {
    338339    $user_id = get_current_user_id();
    339     $consumer_key_option_name = 'wc_api_consumer_key_' . $user_id;
    340     $consumer_secret_option_name = 'wc_api_consumer_secret_' . $user_id;
    341     $store_name_option_name = 'wc_api_store_name_' . $user_id;
    342     $site_url = 'wc_api_site_url_' . $user_id;
     340
     341    $consumer_key_option_name = 'wc_api_consumer_key';
     342    $consumer_secret_option_name = 'wc_api_consumer_secret';
     343    $store_name_option_name = 'wc_api_store_name';
     344    $site_url_option_name = 'wc_api_site_url';
    343345    $licenseStatus = get_option('biblio_dispatch_license_status');
    344346    // Fetch the saved options (replace 'plugin_option_key' with the actual option keys)
     
    346348    $consumer_secret = get_option($consumer_secret_option_name);
    347349    $store_name = get_option($store_name_option_name);
    348     $site_url = get_option($site_url);
     350    $site_url = get_option($site_url_option_name);
    349351    if (!is_ssl() ) {
    350352        // Site is not using HTTPS
     
    398400
    399401    // Define option names
    400     $consumer_key_option = 'wc_api_consumer_key_' . $user_id;
    401     $consumer_secret_option = 'wc_api_consumer_secret_' . $user_id;
    402     $store_name_option = 'wc_api_store_name_' . $user_id;
    403     $site_url_option = 'wc_api_site_url_' . $user_id;
    404     $flag_option = 'wc_api_flag_' . $user_id;
     402    $consumer_key_option = 'wc_api_consumer_key';
     403    $consumer_secret_option = 'wc_api_consumer_secret';
     404    $store_name_option = 'wc_api_store_name';
     405    $site_url_option = 'wc_api_site_url';
     406    $flag_option = 'wc_api_flag';
    405407
    406408    $auth_url = AUTH_URL;
     
    530532function biblio_send_deactivation_request($event_type = 'deactivate') {
    531533
    532     $user_id = get_current_user_id();
     534    //$user_id = get_current_user_id();
    533535    $payload = [
    534536        'event'        => $event_type, // deactivate | uninstall
     
    564566function remove_webhook_from_woocommerce() {
    565567    global $wpdb;
    566     $user_id = get_current_user_id();
    567 
    568     //delete_option('biblio_portal_clicked_' . $user_id);
    569     $wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE 'biblio_portal_clicked_%'");
     568    //$user_id = get_current_user_id();
     569
     570    delete_option('biblio_portal_clicked');
     571    //$wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE 'biblio_portal_clicked_%'");
    570572    biblio_send_deactivation_request('deactivate');
    571573
    572     $consumer_key_option = 'wc_api_consumer_key_' . $user_id;
    573     $consumer_secret_option = 'wc_api_consumer_secret_' . $user_id;
    574     $store_name_option = 'wc_api_store_name_' . $user_id;
    575     $site_url_option = 'wc_api_site_url_' . $user_id;
    576     $flag_option = 'wc_api_flag_' . $user_id;
     574    $consumer_key_option = 'wc_api_consumer_key';
     575    $consumer_secret_option = 'wc_api_consumer_secret';
     576    $store_name_option = 'wc_api_store_name';
     577    $site_url_option = 'wc_api_site_url';
     578    $flag_option = 'wc_api_flag';
     579
    577580    $delivery_url = ORDER_DISPATCH_URL;
    578581    // Fetch all webhook IDs from the WooCommerce webhooks table
     
    755758        update_option('biblio_dispatch_license_status', 'activated');
    756759        $user_id = get_current_user_id();
    757         $consumer_key_option = 'wc_api_consumer_key_' . $user_id;
    758         $consumer_secret_option = 'wc_api_consumer_secret_' . $user_id;
    759         $store_name_option = 'wc_api_store_name_' . $user_id;
    760         $site_url_option = 'wc_api_site_url_' . $user_id;
    761         $flag_option = 'wc_api_flag_' . $user_id;
     760
     761        $consumer_key_option = 'wc_api_consumer_key';
     762        $consumer_secret_option = 'wc_api_consumer_secret';
     763        $store_name_option = 'wc_api_store_name';
     764        $site_url_option = 'wc_api_site_url';
     765        $flag_option = 'wc_api_flag';
    762766
    763767        // Check if options already exist
     
    10621066add_action('wp_ajax_biblio_mark_portal_clicked', 'biblio_mark_portal_clicked');
    10631067function biblio_mark_portal_clicked() {
    1064     $user_id = get_current_user_id();
    1065     update_option('biblio_portal_clicked_' . $user_id, 1);
     1068    update_option('biblio_portal_clicked', 1);
    10661069    wp_send_json_success();
    10671070}
  • biblio-dispatch/trunk/readme.txt

    r3486480 r3492619  
    55Requires at least: 6.3
    66Tested up to: 6.9.4
    7 Stable tag: 1.3.2
     7Stable tag: 1.3.4
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    6969= What if i dont have consumer key and consumer secret
    7070
    71   Navigate to the Woocommerce advanced setting's Rest Api section, where you can generate the consumer key and consumer secret.
     71  Navigate to the Woocommerce advanced setting's Rest Api section, where you can generate the consumer key and consumer secret. Also these are now auto generated in the latest version.
    7272
    7373= Do i need to configure Webhook? =
    7474
    75   No, webhooks will be automatically generated while clicks on save button of plugin or while access portal.
     75  No, webhooks will be automatically generated while clicks on save button of plugin or while access bibliodispatch portal.
    7676
    7777== Screenshots ==
     
    147147added UI guidance for users after coming on the settings page of the plugin
    148148
     149= 1.3.4 =
     150bug fixes and improvements for multisite network
     151
    149152== A brief Markdown Example ==
    150153
Note: See TracChangeset for help on using the changeset viewer.