Automattic\WooCommerce\Internal\Orders
OrderAttributionController::has_attribution
Check if this order already has any attribution data
Метод класса: OrderAttributionController{}
Хуков нет.
Возвращает
bool.
Использование
$OrderAttributionController = new OrderAttributionController(); $OrderAttributionController->has_attribution( $order );
- $order(WC_Order) (обязательный)
- The order object.
Список изменений
| С версии 9.8.0 | Введена. |
Код OrderAttributionController::has_attribution() OrderAttributionController::has attribution WC 11.3.0
public function has_attribution( $order ) {
foreach ( $this->field_names as $field ) {
if ( $order->meta_exists( $this->get_meta_prefixed_field_name( $field ) ) ) {
return true;
}
}
return false;
}