Changeset 2983173
- Timestamp:
- 10/24/2023 04:11:35 PM (2 years ago)
- Location:
- bookvault
- Files:
-
- 12 added
- 2 edited
-
tags/3.1 (added)
-
tags/3.1/Bookvault.php (added)
-
tags/3.1/assets (added)
-
tags/3.1/assets/css (added)
-
tags/3.1/assets/css/bv-styles.css (added)
-
tags/3.1/assets/img (added)
-
tags/3.1/assets/img/bv-logo.png (added)
-
tags/3.1/core (added)
-
tags/3.1/core/admin (added)
-
tags/3.1/core/admin/admin.php (added)
-
tags/3.1/readme.txt (added)
-
tags/3.1/uninstall.php (added)
-
trunk/Bookvault.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bookvault/trunk/Bookvault.php
r2983154 r2983173 3 3 * Plugin Name: Bookvault 4 4 * Description: Bookvault plugin for Woocommerce 5 * Version: 3. 0.05 * Version: 3.1.0 6 6 * License: GPL v3 7 7 * Requires at least: 5.6 … … 399 399 400 400 401 // Function to add a custom action to the order actions dropdown 402 function bvlt_ add_order_action($actions, $order) {403 // Add your custom action to the $actions array 404 if (get_option("bvlt_auth") == 1) {405 $actions['b vlResendOrder'] = 'Resend Order To Bookvault';401 add_action('woocommerce_order_actions', 'bvlt_order_resend', 10, 1 ); 402 function bvlt_order_resend( $actions ) { 403 404 if ( is_array( $actions ) ) { 405 $actions['blt_resend_order'] = __( 'Resend Order To Bookvault' ); 406 406 } 407 return $actions; 408 } 409 add_filter('woocommerce_order_actions', 'bvlt_add_order_action', 10, 2); 410 411 // Function to handle the custom action when clicked 412 function bvlt_order_action_handler($order) { 413 // Add your custom action handling code here414 // You can use the $order object for additional processing415 // For example, send an email, update the order status, etc. 416 // The order ID can be accessed as $order->get_id() 407 408 return $actions; 409 410 } 411 412 /** 413 * Filter name is woocommerce_order_action_{$action_slug} 414 */ 415 add_action( 'woocommerce_order_action_blt_resend_order', 'bvlt_order_resend_action' ); 416 function bvlt_order_resend_action( $order ) { 417 417 resendOrder($order->get_id()); 418 418 } 419 add_action('woocommerce_order_action_custom_action', 'bvlt_order_action_handler');420 421 419 422 420 // Adding to admin order list bulk dropdown a custom action 'custom_downloads' … … 430 428 431 429 // Make the action from selected orders 432 add_filter( 'handle_bulk_actions-edit-shop_order', 'downloads_handle_bulk_action_edit_shop_order', 10, 3 ); 433 function downloads_handle_bulk_action_edit_shop_order( $redirect_to, $action, $post_ids ) { 430 add_filter( 'handle_bulk_actions-edit-shop_order', 'bvlt_bulk_resend_orders', 10, 3 ); 431 432 function bvlt_bulk_resend_orders( $redirect_to, $action, $post_ids ) { 434 433 if ( $action !== 'bvlt_resend_orders' ) 435 434 return $redirect_to; // Exit -
bookvault/trunk/readme.txt
r2983154 r2983173 5 5 Tested up to: 6.3 6 6 Requires PHP: 5.6 7 Stable tag: 3. 07 Stable tag: 3.1 8 8 License: GPLv3 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.en.html … … 68 68 * Ability to batch resend orders 69 69 * Fixed the stability of the portal 70 71 = 3.1 = 72 * Fixed bug with orders not being resent from the order page
Note: See TracChangeset
for help on using the changeset viewer.