Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Ameliabooking_Helpers::get_coupon( int $coupon_id )
Fetches a single coupon from amelia_coupons
table.
Description Description
Amelia does not provide reliable way to retrieve the coupon properties in the Trigger.
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Parameters Parameters
- $coupon_id
(Required) The ID of the coupon.
Return Return
(array) The coupon.
Source Source
File: src/integrations/ameliabooking/helpers/ameliabooking-helpers.php
public function get_coupon( $coupon_id ) { global $wpdb; return $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}amelia_coupons WHERE id = %d", $coupon_id ), ARRAY_A ); }
Expand full source code Collapse full source code View on Github