Вы будете использовать WC_Order
метод get_status()
во что-то вроде:
if( in_array( $order->get_status(), array( 'custom-one', 'custom-two') ) ) {
printf( wp_kses(
/* translators: %1s item is the name of the site, %2s is a html link */
__( '%2$s', 'woocommerce' ), array(
'a' => array(
'href' => array(),
),
) ),
esc_html( get_bloginfo( 'name', 'display' )
), '<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' .
esc_html__( 'Click here to pay for this order', 'woocommerce' ) . '</a>' );
}
Он должен работать (где вы замените custom-one
и custom-two
вашими слагами пользовательских статусов)