Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Debabrata Karfa

    (@dkarfa)

    PR: PR Link

    For cpt the 'show_in_rest' => false, bydefault.

    wish to know are you Stripe Connect API
    refer, https://stripe.com/docs/connect/direct-charges#collecting-fees

    
    add_filter( 'woocommerce_stripe_request_body', 'add_application_fee', 20, 2 );
    
    function add_application_fee( $request, $api ) {
    	
    	//	Try to retrieve the order ID from the metadata
    	
    	$orderID = $request['metadata']['order_id'];
    	$order = wc_get_order( $orderID );
    	
    	//	This filter is hit multiple times, so the order ID might not be available. If not, just return the request.
    	
    	if ( !$order ) {
    		return $request;
    	}
    	
    	// This is a custom filter that returns a fee based on the order total. 
    	
    	$applicationFee = 125;	//Change value with your fees, will charge $1.25 as application fee.
    	
    	if ( $applicationFee > 0 ) {
    		$request['application_fee_amount'] = $applicationFee;
    	}
    	
    	return $request;
    }
    
    Thread Starter Debabrata Karfa

    (@dkarfa)

    Thanks for update me,
    I change that

    <?php  
    
                            $args = array (
                                'post_type'          => 'artistspage',
                                'posts_per_page'     => 6,
                                'order'              => 'ASC',
                                'orderby'            => 'modified',
                                'paged'              => get_query_var('paged')
                            );
                            // The Query
                            $wp_query = new WP_Query( $args );
                            while ( $wp_query->have_posts() ) : $wp_query->the_post();
                            ?>
                                <div class="thumb-who">
                                    <a href="<?php the_permalink(); ?>">
                                    <?php the_post_thumbnail('who-thumb'); ?>
                                    </a>
                                    <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
                                    <p><?php the_excerpt(); ?></p>
                                    <a href="<?php the_permalink() ?>" id="read-more" rel="bookmark">Read More ></a>
                                </div>
                            <?php
    
                            endwhile;
                            wp_pagenavi( array( 'query' => $wp_query ) );
                            wp_reset_postdata();	// avoid errors further down the page
    
                        ?>

    In my Settings > Permalinks, I select Custom Structure and put this /%category%/%postname%/

    But no success for me.

    Where

    <?php
                            // WP_Query arguments
                            if ( get_query_var('paged') ) { $paged = get_query_var('paged'); }
                            elseif ( get_query_var('page') ) { $paged = get_query_var('page'); }
                            else { $paged = 1; }
                            $args = array (
                                'category_name'          => 'news',
                                'pagination'             => true,
                                'posts_per_page'         => '6',
                                'order'                  => 'ASC',
                                'orderby'                => 'modified',
                                'paged'                  => $paged
                            );
                            // The Query
                            $my_query = new WP_Query( $args );
                            while ( $my_query->have_posts() ) : $my_query->the_post();
                            ?>
                                <div class="thumb-who">
                                    <a href="<?php the_permalink(); ?>">
                                    <?php the_post_thumbnail('who-thumb'); ?>
                                    </a>
                                    <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
                                    <p><?php the_excerpt(); ?></p>
                                    <a href="<?php the_permalink() ?>" id="read-more" rel="bookmark">Read More ></a>
                                </div>
                            <?php
                            endwhile;
                            wp_pagenavi( array( 'query' => $my_query ) );
                            wp_reset_postdata();	// avoid errors further down the page
                            ?>

    Working fine for and Give results at https://www.domain.tld/news/page/2/ too

    Working for Category Query but not working for Post_type

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)