Changeset 3492619
- Timestamp:
- 03/27/2026 11:57:31 AM (5 days ago)
- Location:
- biblio-dispatch/trunk
- Files:
-
- 2 edited
-
bibliodispatch-plugin.php (modified) (11 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
biblio-dispatch/trunk/bibliodispatch-plugin.php
r3486480 r3492619 3 3 Plugin Name: Print Management with Biblio Dispatch 4 4 Description: 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. 35 Version: 1.3.4 6 6 License: GPL2 7 7 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 101 101 return $license_secret_key; 102 102 } 103 103 104 function check_license_status($license_key) { 104 105 $license_secret_key=fetch_license_secret_key(); … … 179 180 } 180 181 } 182 181 183 function activate_license($license_key) { 182 184 $license_secret_key=fetch_license_secret_key(); … … 306 308 wp_enqueue_style('wp-pointer'); 307 309 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); 310 311 311 312 if (!$clicked) { … … 337 338 function check_plugin_configuration_prompt() { 338 339 $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'; 343 345 $licenseStatus = get_option('biblio_dispatch_license_status'); 344 346 // Fetch the saved options (replace 'plugin_option_key' with the actual option keys) … … 346 348 $consumer_secret = get_option($consumer_secret_option_name); 347 349 $store_name = get_option($store_name_option_name); 348 $site_url = get_option($site_url );350 $site_url = get_option($site_url_option_name); 349 351 if (!is_ssl() ) { 350 352 // Site is not using HTTPS … … 398 400 399 401 // 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'; 405 407 406 408 $auth_url = AUTH_URL; … … 530 532 function biblio_send_deactivation_request($event_type = 'deactivate') { 531 533 532 $user_id = get_current_user_id();534 //$user_id = get_current_user_id(); 533 535 $payload = [ 534 536 'event' => $event_type, // deactivate | uninstall … … 564 566 function remove_webhook_from_woocommerce() { 565 567 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_%'"); 570 572 biblio_send_deactivation_request('deactivate'); 571 573 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 577 580 $delivery_url = ORDER_DISPATCH_URL; 578 581 // Fetch all webhook IDs from the WooCommerce webhooks table … … 755 758 update_option('biblio_dispatch_license_status', 'activated'); 756 759 $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'; 762 766 763 767 // Check if options already exist … … 1062 1066 add_action('wp_ajax_biblio_mark_portal_clicked', 'biblio_mark_portal_clicked'); 1063 1067 function 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); 1066 1069 wp_send_json_success(); 1067 1070 } -
biblio-dispatch/trunk/readme.txt
r3486480 r3492619 5 5 Requires at least: 6.3 6 6 Tested up to: 6.9.4 7 Stable tag: 1.3. 27 Stable tag: 1.3.4 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later … … 69 69 = What if i dont have consumer key and consumer secret 70 70 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. 72 72 73 73 = Do i need to configure Webhook? = 74 74 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. 76 76 77 77 == Screenshots == … … 147 147 added UI guidance for users after coming on the settings page of the plugin 148 148 149 = 1.3.4 = 150 bug fixes and improvements for multisite network 151 149 152 == A brief Markdown Example == 150 153
Note: See TracChangeset
for help on using the changeset viewer.