Photos not supported in woocommerces store

Home Forums WordPress Theme Outdoor – Creative Photography/Portfolio WP Theme Photos not supported in woocommerces store

This topic contains 1 reply, has 2 voices, and was last updated by  Alma Viki 8 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #19134

    sann1432
    Participant

    Support Expired

    Currently sale of photos are not supported in the functions and therefore do not display in the store.
    while using the photography plugin from woocommerce you can not sell digital images as a product type without loging into a customer registared account.

    please could you add the following to the functions.php to allow images to be sold as products.

    This will mean that when you update the theme it will not break my site. that said it’s a great finction for other photographers wanting to sell thier images to the public.

    ——-
    add_action( ‘pre_get_posts’, ‘show_photograhpy_products’, 99 );

    function show_photograhpy_products( $query ) {
    if ( ! $query->is_main_query() || is_admin() ) {
    return;
    }

    if ( isset( $query->query_vars[‘tax_query’] ) && is_post_type_archive( ‘product’ ) || ( is_page() && isset( $query->query_vars[‘page_id’] ) && wc_get_page_id( ‘shop’ ) == $query->query_vars[‘page_id’] ) && ! is_search() ) {
    foreach ( $query->query_vars[‘tax_query’] as $key => $arr ) {
    if ( in_array( ‘photography’, $arr[‘terms’] ) ) {
    unset( $query->query_vars[‘tax_query’][ $key ] );
    }
    }
    }
    }
    ——–

    #19229

    Alma Viki
    Participant

    Unknow

    Hi,

    We are sorry for delay reply.
    But can you show to us the issues, I don’t see the issues on current version.

    Thanks for your sympathy.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Hello! CityBook version 1.2.7 was released. Bulk Import Add-On, OpenStreetMapView Details
+