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
// $product - WC_Product | |
// $qty - pass huge amount to see lowest prcie for bulk | |
function adpGetMinBulkPriceOfProduct($product, $qty) | |
{ | |
$processedProduct = adp_functions()->calculateProduct($product, $qty); | |
if ($processedProduct instanceof \ADP\BaseVersion\Includes\PriceDisplay\ProcessedProductSimple) { | |
return $processedProduct->getMinDiscountRangePrice(); | |
} else { |
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
class AdpWcOrderEditExtensions | |
{ | |
public function __construct() | |
{ | |
} | |
public function register() | |
{ | |
add_action('woocommerce_admin_order_item_values', [$this, "printRowItem"], 10, 3); | |
add_action("woocommerce_admin_order_item_headers", [$this, "addHeader"], 10, 1); |
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
// Export Products as columns | |
// Format - XLS | |
// Checked - Output column titles as first line | |
// Button - Export w/o Progressbar | |
class Woe_Product_Columns { | |
var $columns_per_product = 2; | |
function __construct() { | |
//add settings, , skip products | |
add_action("woe_settings_above_buttons", array($this,"draw_options") ); | |
add_filter("woe_settings_validate_defaults",array($this,"skip_products"),10,1); |
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
// hide "cod" payment method at frontend checkout page | |
add_filter( 'woocommerce_available_payment_gateways', function( $available_gateways ) { | |
if ( !is_admin() ) | |
unset($available_gateways['cod']); | |
return $available_gateways; | |
}); |
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 | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly | |
} | |
/** | |
* @var string $header_html | |
* @var array $table_header | |
* @var array $rows | |
* @var string $footer_html |
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 // only copy this line if needed! | |
/** | |
* Filter the Jilt financial status for the order. | |
* | |
* @param string $status the financial status | |
* @param int $order_id the order's ID | |
* @return string updated status | |
*/ |
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
class WOE_add_product_shipping_taxes{ | |
var $taxes = array("CGST","SGST","IGST"); | |
function __construct() { | |
add_filter('woe_get_order_fields', array($this,'add_order_fields'), 10, 1); | |
add_filter('woe_get_order_product_fields', array($this,'add_product_fields'), 10, 2); | |
add_filter('woe_fetch_order', array($this,'fill_shipping_taxes'), 10, 2); | |
add_filter('woe_fetch_order_product',array($this,'fill_product_taxes'), 10, 5); | |
} |
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
// Export Products as columns | |
// Format - XLS | |
// Checked - Output column titles as first line | |
// Button - Export w/o Progressbar | |
class Woe_Product_Columns { | |
var $columns_per_product = 3; | |
function __construct() { | |
//add settings, , skip products | |
add_action("woe_settings_above_buttons", array($this,"draw_options") ); |
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 | |
/** | |
* Plugin Name: WooCommerce Email Customer Address | |
* Plugin URI: https://gist.github.com/BFTrick/7891074 | |
* Description: Email the site admin when a customer changes their address | |
* Author: Patrick Rauland | |
* Author URI: http://patrickrauland.com/ | |
* Version: 1.0.1 | |
* | |
* This program is free software: you can redistribute it and/or modify |