This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @see https://woocommerce.com/products/print-invoices-packing-lists/ | |
* @see https://woocommerce.com/products/product-bundles/ | |
*/ | |
$show_bundled_items_individually_in_packing_lists = function( string $type, \WC_PIP_Document $document, \WC_Order $order ) { | |
if ( 'packing-list' !== $type ) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Register the new field in the array of settings fields for the gateway | |
* | |
* @hooked woocommerce_settings_api_form_fields_{$gateway_id} | |
* | |
* @param array $settings The gateway's existing settings. | |
* | |
* @return array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* In this example, we will test has WooCommerce populated the global $product variable. | |
* | |
* Basically, we add an action to the WordPress `all` hook, then `error_log` when the criteria is true, and unhook. | |
*/ | |
global $has_product_global_been_set; | |
$has_product_global_been_set = function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/includes/class-wcslack-settings-legacy.php b/includes/class-wcslack-settings-legacy.php | |
index 6f7be3a..c4102aa 100644 | |
--- a/includes/class-wcslack-settings-legacy.php | |
+++ b/includes/class-wcslack-settings-legacy.php | |
@@ -618,7 +618,6 @@ if ( ! class_exists( 'WC_Slack_Settings' ) ) { | |
if ( isset( $_GET['wcslack_reload_channels'] ) && ( $_GET['wcslack_reload_channels'] == 1 ) ) { | |
delete_transient( 'wcslack_all_channels' ); | |
- delete_transient( 'wcslack_all_groups' ); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* When the status is set to pending from completed, record | |
* what caused/initiated the change. | |
* | |
* @hooked woocommerce_order_status_changed | |
* | |
* @see https://www.reddit.com/r/woocommerce/comments/mi1f85/status_on_old_orders_change_from_completed_to/ | |
* @see WC_Order::status_transition() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/woocommerce-gateway-stats.php b/woocommerce-gateway-stats.php | |
index e43cef5..e0726f6 100644 | |
--- a/woocommerce-gateway-stats.php | |
+++ b/woocommerce-gateway-stats.php | |
@@ -5,7 +5,7 @@ Plugin URI: https://ajdg.solutions/product/woocommerce-gateway-stats/?pk_campaig | |
Author: Arnan de Gans | |
Author URI: https://www.arnan.me/?pk_campaign=woo_gateway_stats | |
Description: See which payment gateways are used the most. This plugin has no settings. | |
-Version: 1.0.7 | |
+Version: 1.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* When the status is set to processing, record what caused/initiated the change. | |
* | |
* Need in `wp-config.php`: | |
* define('WP_DEBUG', true); | |
* define('WP_DEBUG_LOG', true); | |
* | |
* @hooked woocommerce_order_status_changed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Unhook a closure from a WordPress action by using the class the closure binds to to compare. | |
*/ | |
$action_name = 'admin_notices'; | |
$priority = 10; | |
$expected_class = MyClass::class; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Maintenance_Redirect { | |
/** | |
* Exclude the Push Notifications for WordPress registration endpoint from redirection. | |
* | |
* @hooked wpjf3_matches | |
* | |
* @param array $wpjf3_matches List of reasons to disable redirection (not actually used anywhere, but array cannot be empty). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Sets/overwrites the super-admin user-id in the e-signature cache. | |
* | |
* Allows editing documents and saving documents as PDF, | |
* but not previewing documents in draft or viewing signed documents in the browser. | |
*/ | |
function bh_set_esig_super_admin() { | |
/** |