This file contains hidden or 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 hidden or 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 | |
| /** | |
| * Disables the Flat Rate and Free Shipping shipping methods provided by MarketShip. | |
| * | |
| * @param array $methods MarketShip shipping methods. | |
| * | |
| * @return array | |
| */ | |
| function disable_marketship_shipping_methods( $methods ) { |
This file contains hidden or 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 | |
| /** | |
| * Forces Simple Sales Tax to calculate and display taxes on the cart page. | |
| * | |
| * @return bool | |
| */ | |
| function sst_force_tax_display() { | |
| return is_cart() || is_checkout(); | |
| } |
This file contains hidden or 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: Multiple Packages for WooCommerce | |
| * Plugin URI: http://www.bolderelements.net/multiple-packages-woocommerce/ | |
| * Description: A simple UI to take advatage of multiple shipping packages without PHP knowledge | |
| * Author: Erica Dion | |
| * Author URI: http://www.bolderelements.net/ | |
| * Version: 1.0.2 | |
| * WC requires at least: 2.6.0 | |
| * WC tested up to: 3.3.0 |
This file contains hidden or 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 the taxable price for all Composite Products to the product price. | |
| * This overrides the default behavior of Simple Sales Tax, which is to tax | |
| * the components of a Composite Product and not the product itself. | |
| * | |
| * This hook MUST run with priority 11 or later to work properly. | |
| * | |
| * @see SST_Composite_Products::filter_composite_product_price() |
This file contains hidden or 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
| add_filter( 'woocommerce_cart_shipping_packages', function( $packages ) { | |
| foreach ( $packages as $key => $package ) { | |
| $is_admin_package = $package['seller_id'] && user_can( $package['seller_id'], 'manage_options' ); | |
| if ( $is_admin_package ) { | |
| // Allow shipping via any shipping method | |
| $packages[ $key ]['ship_via'] = array(); | |
| } | |
| } | |
| return $packages; | |
| }, 30 ); |
This file contains hidden or 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 | |
| /** | |
| * Change the currency symbol for LKR to Rs. | |
| * | |
| * @param array $symbols Array of registered currency symbols. | |
| * | |
| * @return array | |
| */ | |
| function pp_change_lkr_currency_symbol( $symbols ) { |
This file contains hidden or 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
| add_filter( 'trs_show_dokan_policy_fields', '__return_false' ); |
This file contains hidden or 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 label Table Rate Shipping uses for free shipping. | |
| * Replace NEW_FREE_SHIPPING_LABEL with the label you want to use | |
| * for free shipping. | |
| * | |
| * @param string $label Shipping method label. | |
| * @param WC_Shipping_Rate $method Shipping method rate data. | |
| * |