Description
This function attempts to get the WordPress post object ID for a given buyCRED pending payment ID.
Returns
(bool | int) Returns either the WordPress post object ID or FALSE
on failure.
Parameters
Param | Type | Required | Description | |
---|---|---|---|---|
function buycred_get_pending_payment_id( |
||||
$payment_id |
string | Yes | The buyCRED pending payment ID. |
|
) { ... } |
Example
Example 1: Check if a given ID is a pending payment or not.
$payment_id = sanitize_text_field( $_GET['id'] ); $payment_id = buycred_get_pending_payment_id( $payment_id ); if ( $payment_id !== false ) { // This is a pending payment }