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 | |
/** | |
* NOTE: This code example uses the generic vendor prefix 'prefix_' and omits text domains where | |
* the WordPress internationalization functions are used. You should replace 'prefix_' with your | |
* own prefix and insert your text domain where appropriate when incorporating this code into your | |
* plugin or theme. | |
*/ | |
/** |
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 | |
/** | |
* Moves the SST Tax Exempt form to after the customer billing details. | |
* Place in your child theme's functions.php file or in a plugin. | |
*/ | |
function sst_move_tax_exempt_form() { | |
global $wp_filter; | |
if ( ! isset( $wp_filter['woocommerce_checkout_after_customer_details'] ) ) { |
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 | |
use WCV_Payouts\Commissions; | |
use WCV_Payouts\PayoutBuilder; | |
use WCV_Payouts\Payouts; | |
/** | |
* Triggers a payout for all order commissions when an order is marked | |
* complete. | |
* |
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 | |
/** | |
* Filters the `shippo_labels` meta value to remove refunded labels. | |
* Workaround for label purchase limit not being increased after a | |
* label is refunded. | |
* | |
* @param array|string $labels Shippo labels printed for order. | |
* | |
* @return array Labels with refunded labels removed. |
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 | |
/** | |
* Filters the default value of the marketship_shippo_usps_settings | |
* user meta key to enable flat rate services by default. | |
* | |
* @param mixed $value Meta value. | |
* @param int $user_id User ID. | |
* @param string $meta_key Meta key. | |
* @param bool $single Whether to return a single value. |
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 | |
/** | |
* Changes which shipping methods are enabled by default for MarketShip. | |
* | |
* @param array $shipping_methods Shipping methods enabled for vendor. | |
* @param int $vendor_id Vendor user ID. | |
* | |
* @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 | |
/** | |
* Filters the default value for the `shippo_boxes` user meta key. | |
* | |
* @param mixed $value Meta value. | |
* @param int $user_id User ID. | |
* @param string $meta_key Meta key. | |
* @param bool $single Whether to return a single value. | |
* |
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 | |
/** | |
* Changes the usable box volume for MarketShip's packing algorithm to 100%. | |
* | |
* @param float $usable_volume Usable volume for packing. | |
* @param float $total_volume Total box volume. | |
* | |
* @return float Updated usable volume. | |
*/ |
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 | |
/** | |
* Filters the MarketShip settings to forcibly disable some shipping methods. | |
* | |
* @param array $settings MarketShip settings. | |
* | |
* @return array | |
*/ | |
function marketship_force_disable_shipping_methods( $settings ) { |
NewerOlder