@@ -125,7 +125,6 @@ function wpdispensary_flowers_shortcode( $atts ) {
125
125
126
126
/** Get the pricing for Flowers */
127
127
128
- $ priceHalfGram = get_post_meta ( get_the_ID (), '_halfgram ' , true );
129
128
$ priceGram = get_post_meta ( get_the_ID (), '_gram ' , true );
130
129
$ priceEighth = get_post_meta ( get_the_ID (), '_eighth ' , true );
131
130
$ priceQuarter = get_post_meta ( get_the_ID (), '_quarter ' , true );
@@ -321,29 +320,25 @@ function wpdispensary_flowers_shortcode( $atts ) {
321
320
'ZWL ' => 'Z$ ' ,
322
321
);
323
322
324
- if ( '' === $ priceGram && '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceHalfOunce && '' === $ priceOunce ) {
325
- $ pricing = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_halfgram ' , true ) . ' per half gram ' ;
326
- } elseif ( '' === $ priceHalfGram && '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceHalfOunce && '' === $ priceOunce ) {
323
+ if ( '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceHalfOunce && '' === $ priceOunce ) {
327
324
$ pricing = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_gram ' , true ) . ' per gram ' ;
328
- } elseif ( '' === $ priceHalfGram && '' === $ priceGram && '' === $ priceQuarter && '' === $ priceHalfOunce && '' === $ priceOunce ) {
325
+ } elseif ( '' === $ priceGram && '' === $ priceQuarter && '' === $ priceHalfOunce && '' === $ priceOunce ) {
329
326
$ pricing = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_eighth ' , true ) . ' per eighth ' ;
330
- } elseif ( '' === $ priceHalfGram && '' === $ priceGram && '' === $ priceEighth && '' === $ priceHalfOunce && '' === $ priceOunce ) {
327
+ } elseif ( '' === $ priceGram && '' === $ priceEighth && '' === $ priceHalfOunce && '' === $ priceOunce ) {
331
328
$ pricing = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_quarter ' , true ) . ' per quarter ounce ' ;
332
- } elseif ( '' === $ priceHalfGram && '' === $ priceGram && '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceOunce ) {
329
+ } elseif ( '' === $ priceGram && '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceOunce ) {
333
330
$ pricing = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_halfounce ' , true ) . ' per half ounce ' ;
334
- } elseif ( '' === $ priceHalfGram && '' === $ priceGram && '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceHalfOunce ) {
331
+ } elseif ( '' === $ priceGram && '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceHalfOunce ) {
335
332
$ pricing = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_ounce ' , true ) . ' per ounce ' ;
336
333
} else {
337
334
$ pricing = '' ;
338
335
}
339
336
340
- if ( '' === $ priceHalfGram && '' === $ priceGram && '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceHalfOunce && '' === $ priceOunce ) {
337
+ if ( '' === $ priceGram && '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceHalfOunce && '' === $ priceOunce ) {
341
338
$ pricing = ' ' ;
342
339
}
343
340
344
- if ( get_post_meta ( get_the_ID (), '_halfgram ' , true ) ) {
345
- $ pricinglow = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_halfgram ' , true );
346
- } elseif ( get_post_meta ( get_the_ID (), '_gram ' , true ) ) {
341
+ if ( get_post_meta ( get_the_ID (), '_gram ' , true ) ) {
347
342
$ pricinglow = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_gram ' , true );
348
343
} elseif ( get_post_meta ( get_the_ID (), '_eighth ' , true ) ) {
349
344
$ pricinglow = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_eighth ' , true );
@@ -352,7 +347,9 @@ function wpdispensary_flowers_shortcode( $atts ) {
352
347
} elseif ( get_post_meta ( get_the_ID (), '_halfounce ' , true ) ) {
353
348
$ pricinglow = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_halfounce ' , true );
354
349
}
350
+
355
351
$ pricingsep = ' - ' ;
352
+
356
353
if ( get_post_meta ( get_the_ID (), '_ounce ' , true ) ) {
357
354
$ pricinghigh = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_ounce ' , true );
358
355
} elseif ( get_post_meta ( get_the_ID (), '_halfounce ' , true ) ) {
@@ -2211,7 +2208,6 @@ function wpdispensary_carousel_shortcode( $atts ) {
2211
2208
2212
2209
/** Get the pricing for Flowers and Concentrates */
2213
2210
2214
- $ priceHalfGram = get_post_meta ( get_the_ID (), '_halfgram ' , true );
2215
2211
$ priceGram = get_post_meta ( get_the_ID (), '_gram ' , true );
2216
2212
$ priceEighth = get_post_meta ( get_the_ID (), '_eighth ' , true );
2217
2213
$ priceQuarter = get_post_meta ( get_the_ID (), '_quarter ' , true );
@@ -2407,25 +2403,21 @@ function wpdispensary_carousel_shortcode( $atts ) {
2407
2403
'ZWL ' => 'Z$ ' ,
2408
2404
);
2409
2405
2410
- if ( '' === $ priceGram && '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceHalfOunce && '' === $ priceOunce ) {
2411
- $ pricing = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_halfgram ' , true ) . ' per half gram ' ;
2412
- } elseif ( '' === $ priceHalfGram && '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceHalfOunce && '' === $ priceOunce ) {
2406
+ if ( '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceHalfOunce && '' === $ priceOunce ) {
2413
2407
$ pricing = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_gram ' , true ) . ' per gram ' ;
2414
- } elseif ( '' === $ priceHalfGram && '' === $ priceGram && '' === $ priceQuarter && '' === $ priceHalfOunce && '' === $ priceOunce ) {
2408
+ } elseif ( '' === $ priceGram && '' === $ priceQuarter && '' === $ priceHalfOunce && '' === $ priceOunce ) {
2415
2409
$ pricing = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_eighth ' , true ) . ' per eighth ' ;
2416
- } elseif ( '' === $ priceHalfGram && '' === $ priceGram && '' === $ priceEighth && '' === $ priceHalfOunce && '' === $ priceOunce ) {
2410
+ } elseif ( '' === $ priceGram && '' === $ priceEighth && '' === $ priceHalfOunce && '' === $ priceOunce ) {
2417
2411
$ pricing = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_quarter ' , true ) . ' per quarter ounce ' ;
2418
- } elseif ( '' === $ priceHalfGram && '' === $ priceGram && '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceOunce ) {
2412
+ } elseif ( '' === $ priceGram && '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceOunce ) {
2419
2413
$ pricing = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_halfounce ' , true ) . ' per half ounce ' ;
2420
- } elseif ( '' === $ priceHalfGram && '' === $ priceGram && '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceHalfOunce ) {
2414
+ } elseif ( '' === $ priceGram && '' === $ priceEighth && '' === $ priceQuarter && '' === $ priceHalfOunce ) {
2421
2415
$ pricing = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_ounce ' , true ) . ' per ounce ' ;
2422
2416
} else {
2423
2417
$ pricing = '' ;
2424
2418
}
2425
2419
2426
- if ( get_post_meta ( get_the_ID (), '_halfgram ' , true ) ) {
2427
- $ pricinglow = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_halfgram ' , true );
2428
- } elseif ( get_post_meta ( get_the_ID (), '_gram ' , true ) ) {
2420
+ if ( get_post_meta ( get_the_ID (), '_gram ' , true ) ) {
2429
2421
$ pricinglow = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_gram ' , true );
2430
2422
} elseif ( get_post_meta ( get_the_ID (), '_eighth ' , true ) ) {
2431
2423
$ pricinglow = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_eighth ' , true );
@@ -2434,7 +2426,9 @@ function wpdispensary_carousel_shortcode( $atts ) {
2434
2426
} elseif ( get_post_meta ( get_the_ID (), '_halfounce ' , true ) ) {
2435
2427
$ pricinglow = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_halfounce ' , true );
2436
2428
}
2429
+
2437
2430
$ pricingsep = ' - ' ;
2431
+
2438
2432
if ( get_post_meta ( get_the_ID (), '_ounce ' , true ) ) {
2439
2433
$ pricinghigh = $ currency_symbols [ $ wpd_currency ] . '' . get_post_meta ( get_the_id (), '_ounce ' , true );
2440
2434
} elseif ( get_post_meta ( get_the_ID (), '_halfounce ' , true ) ) {
0 commit comments