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: Registration Order Link for WooCommerce | |
| * Plugin URI: http://skyver.ge/5S | |
| * Description: Automatically links previous orders to new customer accounts upon WooCommerce registration. | |
| * Author: SkyVerge | |
| * Author URI: http://www.skyverge.com/ | |
| * Version: 1.0.0 | |
| * Text Domain: link-wc-orders | |
| * |
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
| /** | |
| * Each of these samples can be used - note that you should pick one rather than add them all. | |
| * | |
| * How to use WC notices: https://github.com/woothemes/woocommerce/blob/master/includes/wc-notice-functions.php#L96 | |
| * Tutorial: http://www.skyverge.com/blog/edit-woocommerce-templates/ | |
| **/ | |
| /** | |
| * Add a content block after all notices, such as the login and coupon notices. | |
| * |
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: WooCommerce Upsells Shortcode | |
| * Plugin URI: http://skyver.ge/51 | |
| * Description: Adds a shortcode to output WooCommerce product upsells; removes them from the original location when used | |
| * Author: SkyVerge | |
| * Author URI: https://www.skyverge.com/ | |
| * Version: 1.0.0 | |
| * | |
| * Copyright: (c) 2016 SkyVerge, Inc. (info@skyverge.com) |
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 repeat purchase for products / variations | |
| * | |
| * @param bool $purchasable true if product can be purchased | |
| * @param \WC_Product $product the WooCommerce product | |
| * @return bool $purchasable the updated is_purchasable check | |
| */ | |
| function sv_disable_repeat_purchase( $purchasable, $product ) { |
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 | |
| // only copy the opening php tag if needed | |
| // Change the shop / product prices if a unit_price is set | |
| function sv_change_product_html( $price_html, $product ) { | |
| $unit_price = get_post_meta( $product->id, 'unit_price', true ); | |
| if ( ! empty( $unit_price ) ) { | |
| $price_html = '<span class="amount">' . wc_price( $unit_price ) . ' per kg</span>'; | |
| } |
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 // ONLY COPY THIS LINE IF NEEDED! | |
| /** | |
| * Adds the ability to sort products in the shop based on the SKU | |
| * Can be combined with tips here to display the SKU on the shop page: https://www.skyverge.com/blog/add-information-to-woocommerce-shop-page/ | |
| * | |
| * @param array $args the sorting args | |
| * @return array updated args | |
| */ | |
| function sv_add_sku_sorting( $args ) { |
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 | |
| /** | |
| * Replaces the Site Member role with the Customer role when a membership becomes inactive | |
| * | |
| * @param \WC_User_Membership $user_membership the user's membership | |
| * @param string $old_status the previous membership status | |
| * @param string $new_status the new membership status | |
| */ | |
| function sv_update_user_role_with_membership( $user_membership, $old_status, $new_status ) { |
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: WooCommerce Active Shipping Widget | |
| * Plugin URI: https://www.skyverge.com/blog/how-to-create-a-woocommerce-widget/ | |
| * Description: Adds a widget to display a list of active WooCommerce shipping methods | |
| * Author: SkyVerge | |
| * Author URI: https://www.skyverge.com/ | |
| * Version: 1.0.0 | |
| * Text Domain: wc-active-shipping-widget | |
| * |
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 // only copy if needed | |
| /** | |
| * Example: Add order meta to the REST API | |
| * WC 2.6+ | |
| * | |
| * @param \WP_REST_Response $response The response object. | |
| * @param \WP_Post $post Post object. | |
| * @param \WP_REST_Request $request Request object. | |
| * @return object updated response object |
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 // only copy if needed | |
| /** | |
| * Add a custom action to order actions select box on edit order page | |
| * Only added for paid orders that haven't fired this action yet | |
| * | |
| * @param array $actions order actions array to display | |
| * @return array - updated actions | |
| */ | |
| function sv_wc_add_order_meta_box_action( $actions ) { |
NewerOlder