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 | |
| // Add filter to replace voucher template shortcodes in preview pdf | |
| add_filter( 'woo_vou_pdf_template_preview_html', 'woo_vou_pdf_template_preview_replace_shortcodes', 10, 2 ); | |
| /** | |
| * Preview PDF - Replace shortcodes with value | |
| * Replace {buyerphone} shortcode with value | |
| */ | |
| function woo_vou_pdf_template_preview_replace_shortcodes( $voucher_template_html, $voucher_template_id ) { |
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 | |
| /** | |
| * Adding Custom shortcode value in PDF voucher | |
| */ | |
| function woo_vou_pdf_template_replace_shortcodes( $voucher_template_html, $orderid, $item_key, $items, $voucodes, $productid ) { | |
| // Creating order object for order id | |
| $woo_order = new WC_Order( $orderid ); | |
| // get buyerphone value |
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 | |
| add_action('woo_vou_check_qrcode_top', 'woo_vou_add_redeem_btn_on_top'); | |
| function woo_vou_add_redeem_btn_on_top() { | |
| echo '<tr class="woo-vou-voucher-code-submit-wrap"> | |
| <td> | |
| <input type="submit" id="woo_vou_voucher_code_submit" name="woo_vou_voucher_code_submit" class="button-primary" value="'.__( "Redeem", "woovoucher" ).'"/> | |
| <div class="woo-vou-loader woo-vou-voucher-code-submit-loader"><img src="' . WOO_VOU_IMG_URL . '/ajax-loader.gif"/></div> | |
| </td> |
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 | |
| // add filter to change check voucher code valid message | |
| add_filter( 'woo_vou_voucher_code_valid_message', 'woo_vou_voucher_code_valid_message', 10, 3 ); | |
| function woo_vou_voucher_code_valid_message( $message, $product_name, $voucodeid ) { | |
| $message = 'Voucher code is valid.'; | |
| return $message; | |
| } | |
| ?> |
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 | |
| // add filter to change check voucher code expired message | |
| add_filter( 'woo_vou_voucher_code_expired_message', 'woo_vou_voucher_code_expired_message', 10, 4 ); | |
| function woo_vou_voucher_code_expired_message( $message, $product_name, $expiry_date, $voucodeid ) { | |
| $message = 'Enetered Voucher Code is expired on '.$expiry_date; | |
| return $message; | |
| } | |
| ?> |
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 | |
| // add filter to change check voucher code used message | |
| add_filter( 'woo_vou_voucher_code_used_message', 'woo_vou_voucher_code_used_message', 10, 4 ); | |
| function woo_vou_voucher_code_used_message( $message, $product_name, $used_code_date, $voucodeid ) { | |
| $message = 'Voucher Code is used on '.$used_code_date; | |
| return $message; | |
| } | |
| ?> |
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 | |
| // add filter to change check voucher code invalid message | |
| add_filter( 'woo_vou_voucher_code_invalid_message', 'woo_vou_voucher_code_invalid_message' ); | |
| function woo_vou_voucher_code_invalid_message( $message ) { | |
| $message = 'Enetered Voucher code is Invalid. Please check and try again.'; | |
| return $message; | |
| } | |
| ?> |
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 | |
| function woo_cl_change_default_labels( $defaults ) { | |
| // Change terminology from "collection" to "wishist" | |
| $defaults = array( | |
| 'singular' => __( 'Wishlist', 'woocl' ), | |
| 'plural' => __( 'Wishlists', 'woocl') | |
| ); | |