Created
August 1, 2019 08:36
-
-
Save hedqvist/9eb43e7f7b75de273ff9f3724b989e59 to your computer and use it in GitHub Desktop.
Custom logic to check for offer - YITH Request a quote
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 | |
| /** | |
| * @snippet WooCommerce - Custom Logic for YITH Request a Quote | |
| * @author Redlight Media AB / Christopher Hedqvist | |
| * @compatible WooCommerce 3.6.2 | |
| */ | |
| function redlight_fortnox_ywraq( $is_offer, $order_id ) { | |
| $order = new WC_Order($order_id); | |
| if( 'yes' === $order->get_meta('ywraq_raq',true) ){ | |
| $is_offer = true; | |
| } | |
| return $is_offer; | |
| } | |
| add_filter('obj_fortnox_is_offer', 'redlight_fortnox_ywraq', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment