Created
June 5, 2023 17:35
-
-
Save sunshinephotocart/29f8e62ddb4cf7f21e1521cdb50b967d to your computer and use it in GitHub Desktop.
Entire Gallery Download add to cart link before add to cart form
This file contains 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
// Add this to your theme's functions.php file | |
// Or use this plugin https://wordpress.org/plugins/insert-headers-and-footers/ | |
add_action( 'sunshine_before_add_to_cart_form', function() { | |
echo '<p><a href="' . add_query_arg( 'action', 'add_gallery_download', get_permalink( SunshineFrontend::$current_gallery->ID ) ) . '">Entire Gallery Download</a></p>'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment