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 // Do not add this if it's already added | |
| function wpw_fp_display_followers_count ( $post ) { | |
| $post_ID = $post->ID; | |
| $followers_count = wpw_fp_get_post_followers_count( $post_ID ); | |
| echo '<div class="misc-pub-section misc-pub-section-last"> | |
| <span id="timestamp"> | |
| <label for="wpw_fp_followers_count"> '.__( 'Followers Count:', 'wpwfp' ).' |
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 wpw_fp_default_update_email_notify_field($notify_field) { | |
| $notify_field['default'] = true; | |
| return $notify_field; | |
| } | |
| // add filter to default check notify followers email checkbox |
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 | |
| // Code to set custom width for the pdf background image | |
| function woo_vou_set_custom_bg_width( $height, $width){ | |
| return $width; | |
| } | |
| add_filter( 'woo_vou_pdf_land_bg_img_width', 'woo_vou_set_custom_bg_width', 10,2); | |
| // Code to set custom height for the pdf background image | |
| function woo_vou_set_custom_bg_height( $width, $height){ |
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 voucher code to order number and 3-digit random number | |
| function woo_vou_unlimited_code_pattern_modification( $voucodes_args = array() ) { | |
| if( !empty( $voucodes_args ) && array_key_exists( 'order_id', $voucodes_args ) ) { | |
| $digits = 3; // Amount of digits | |
| $min = pow(10, $digits - 1 ); |
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 order meta value to the Custom shortcode in PDF voucher | |
| */ | |
| function woo_vou_pdf_order_items_meta_shortcodes( $voucher_template_html, $orderid, $item_key, $items, $voucodes, $productid) { | |
| $hidden_order_itemmeta = apply_filters( 'woocommerce_hidden_order_itemmeta', array( | |
| '_qty', |
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 // Do not add this if it's already added on your file. | |
| // Filter code for allowed relative image url instead of full image url | |
| add_filter('wpw_auto_poster_social_media_posting_image', 'wpw_sap_custom_relative_image_src'); | |
| function wpw_sap_custom_relative_image_src( $img_src ) { | |
| if( !empty( $img_src ) ){ | |
| if( is_array( $img_src ) ){ | |
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 this in child theme function.php file. | |
| */ | |
| add_action('wp', 'wp_change_table_collection'); | |
| function wp_change_table_collection() { | |
| global $wpdb; |
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 collection author url to buddypress member page. | |
| */ | |
| add_filter( 'woo_cl_get_collection_page_url', 'custom_woo_cl_get_collection_page_url', 10, 2 ); | |
| function custom_woo_cl_get_collection_page_url( $coll_page_url, $user_name ) { | |
| //Check if buddypress active | |
| if( class_exists( 'BuddyPress' ) ) { | |
| return bp_get_members_directory_permalink() . $user_name; |
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
| // code to remove WooCommerce Pdf Voucher dashboard widget | |
| global $woo_vou_admin; | |
| if( is_user_logged_in() ){ | |
| $user = wp_get_current_user(); | |
| // woo_vou_vendors you can change user role if you want to remove dashboard for any other role | |
| if( !empty( $user ) && in_array( 'woo_vou_vendors' , $user->roles ) ) { | |
| remove_action('wp_dashboard_setup', array( $woo_vou_admin,'woo_vou_add_dashboard_widgets') ); | |
| } | |
| } |
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 | |
| /* | |
| * Jupiter (version 5.6) theme have overide tempalte called "variation-add-to-cart-button.php". | |
| * | |
| * Path: jupiter/woocommerce/singe-product/add-to-cart/variation-add-to-cart-button.php | |
| * | |
| * PDF Voucher using "woocommerce_before_add_to_cart_button" action which is provided by WooCommerce but jupiter removed that. | |
| * That's why on variable product it's not showing recipient details | |
| * |