Downloads Email Tag

/** * Add a {downloads} tag for use in either the purchase receipt email or admin notification emails */ edd_add_email_tag( ‘downloads’, __( ‘A linked list of downloads purchased’, ‘edd’ ), ‘sumobi_edd_email_tag_downloads’ ); /** * The {downloads} email tag */ function…Continue reading

Download Column Thumbnail

add_filter( ‘manage_edit-download_columns’, ‘cor_edd_manage_edit_download_columns’ ); /** * Insert the thumbnail column. */ function cor_edd_manage_edit_download_columns( $columns ) { //Below code will add new column without any text $column_thumbnail = array( ‘icon’ => false ); // Below code will show Thumbnail text in…Continue reading

Add Payment ID to Sales API

function kjm_add_payment_id_to_sales_endpoint( $sales ) { foreach ( $sales[‘sales’] as $sale => $data ) { // If sequential order numbering is on, the ID key will be a string $payment = ( is_string( $data[‘ID’] ) ) ? edd_get_payment_by(‘payment_number’, $data[‘ID’]) : $data[‘ID’];…Continue reading

Allow Webp, SVG, ICO

function allow_additional_mime_types($mime_types) { $mime_types[‘svg’] = ‘image/svg+xml’; $mime_types[‘webp’] = ‘image/webp’; $mime_types[‘ico’] = ‘image/vnd.microsoft.icon’; return $mime_types; } add_filter(‘upload_mimes’, ‘allow_additional_mime_types’);Continue reading

Auto register guests that purchase

function wc_register_guests( $order_id ) { // get all the order data $order = new WC_Order($order_id); //get the user email from the order $order_email = $order->billing_email; // check if there are any users with the billing email as user or email…Continue reading

Buy Now Button – Variation

add_filter( ‘gettext’, ‘customizing_product_variation_message’, 10, 3 ); function customizing_product_variation_message( $translated_text, $untranslated_text, $domain ) { if ($untranslated_text == ‘Select options’) { $translated_text = __( ‘Buy Now’, $domain ); } if ($untranslated_text == ‘Select options’) { $translated_text = __( ‘Buy Now’, $domain );…Continue reading

Continue Shopping Button

/** * Add Continue Shopping Button on Cart Page * Add to theme functions.php file or Code Snippets plugin */ add_action( ‘woocommerce_before_cart_table’, ‘woo_add_continue_shopping_button_to_cart’ ); function woo_add_continue_shopping_button_to_cart() { $shop_page_url = get_permalink( woocommerce_get_page_id( ‘shop’ ) ); echo ‘ ‘; echo ‘ Continue…Continue reading

product data tabs

/** * Rename product data tabs */ add_filter( ‘woocommerce_product_tabs’, ‘woo_rename_tabs’, 98 ); function woo_rename_tabs( $tabs ) { $tabs[‘additional_information’][‘title’] = __( ‘Product Info’ ); // Rename the additional information tab return $tabs; }Continue reading